![]() | |||||||||
|
|
|
Running scripts on boot The Linux kernel in the Opengear console server supports GNU bash shell script. If there is a file installed at /etc/config/rc.local then any commands in that file will be run on boot. For example here is a hello world script: #!/bin/sh echo "Hello World!" echo "Goodbye World!" If the script has been copied from a Windows machine you may need to run the following command on the script before bash can run it successfully: # dos2unix /etc/config/rc.local GNU bash, version 2.05.0(1)-release (arm-OpenGear-linux-gnu) supports the following shell commands: alias [-p] [name[=value] ... ] bg [job_spec] bind [-lpvsPVS] [-m keymap] [-f fi break [n] builtin [shell-builtin [arg ...]] case WORD in [PATTERN [| PATTERN] cd [-PL] [dir] command [-pVv] command [arg ...] compgen [-abcdefjkvu] [-o option] complete [-abcdefjkvu] [-pr] [-o o] continue [n] declare [-afFrxi] [-p] name[=value] dirs [-clpv] [+N] [-N] disown [-h] [-ar] [jobspec ...] echo [-neE] [arg ...] enable [-pnds] [-a] [-f filename] eval [arg ...] exec [-cl] [-a name] file [redirec] exit [n] export [-nf] [name ...] or export false fc [-e ename] [-nlr] [first] [last] fg [job_spec] for NAME [in WORDS ... ;] do COMMA function NAME { COMMANDS ; } or NA getopts optstring name [arg] hash [-r] [-p pathname] [name ...] help [-s] [pattern ...] history [-c] [-d offset] [n] or hi if COMMANDS; then COMMANDS; [ elif jobs [-lnprs] [jobspec ...] or job kill [-s sigspec | -n signum | -si let arg [arg ...] local name[=value] ... logout popd [+N | -N] [-n] printf format [arguments] pushd [dir | +N | -N] [-n] pwd [-PL] read [-ers] [-t timeout] [-p promp] readonly [-anf] [name ...] or read return [n] select NAME [in WORDS ... ;] do COMMANDS set [--abefhkmnptuvxBCHP] [-o opti] shift [n] shopt [-pqsu] [-o long-option] opt source filename suspend [-f] test [expr] time [-p] PIPELINE times trap [arg] [signal_spec ...] true type [-apt] name [name ...] typeset [-afFrxi] [-p] name[=value ulimit [-SHacdflmnpstuv] [limit] umask [-p] [-S] [mode] unalias [-a] [name ...] unset [-f] [-v] [name ...] until COMMANDS; do COMMANDS; done variables - Some variable names an wait [n] while COMMANDS; do COMMANDS; done { COMMANDS ; } |
| © Opengear 2008| Privacy Policy |