diff options
author | Roy Marples <roy@marples.name> | 2008-01-11 12:13:46 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-11 12:13:46 +0000 |
commit | 3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287 (patch) | |
tree | 8b4d6121f0d4b921566eeec2844c9bf76131de78 /sh/runscript.sh | |
parent | 1f4422c72f968405a0b8bf56d4f9c3b619b1b80d (diff) |
Adopt a more C style for scripts and remove vim settings.
Diffstat (limited to 'sh/runscript.sh')
-rwxr-xr-x | sh/runscript.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sh/runscript.sh b/sh/runscript.sh index 19d59411..eea9a3ee 100755 --- a/sh/runscript.sh +++ b/sh/runscript.sh @@ -19,7 +19,8 @@ if [ -z "$1" -o -z "$2" ]; then fi # Descript the init script to the user -describe() { +describe() +{ if [ -n "${description}" ]; then einfo "${description}" else @@ -135,10 +136,11 @@ while [ -n "$1" ]; do ${extra_started_commands}; do if [ "${_cmd}" = "$1" ]; then if type "$1" >/dev/null 2>&1; then - # If we're in the background, we may wish to fake some - # commands. We do this so we can "start" ourselves from - # inactive which then triggers other services to start - # which depend on us. A good example of this is openvpn. + # If we're in the background, we may wish to + # fake some commands. We do this so we can + # "start" ourselves from inactive which then + # triggers other services to start which depend + # on us. A good example of this is openvpn. if yesno ${IN_BACKGROUND}; then for _cmd in ${in_background_fake}; do if [ "${_cmd}" = "$1" ]; then @@ -147,8 +149,8 @@ while [ -n "$1" ]; do fi done fi - # Check to see if we need to be started before we can run - # this command + # Check to see if we need to be started before + # we can run this command for _cmd in ${extra_started_commands}; do if [ "${_cmd}" = "$1" ]; then if ! service_started "${SVCNAME}"; then @@ -180,5 +182,3 @@ while [ -n "$1" ]; do eerror "${SVCNAME}: unknown function \`$1'" exit 1 done - -# vim: set ts=4 : |