Adopt a more C style for scripts and remove vim settings.

This commit is contained in:
Roy Marples
2008-01-11 12:13:46 +00:00
parent 1f4422c72f
commit 3bf49a9bd1
38 changed files with 264 additions and 213 deletions

View File

@@ -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 :