--- /scripts/btnx_init.sh 2007-12-11 15:02:20.000000000 +0100 +++ /scripts/btnx_init.sh 2008-02-20 19:59:09.000000000 +0100 @@ -42,7 +42,7 @@ # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions +#. /lib/lsb/init-functions if [ -z $2 ]; then # empty string ARG_CONFIG="" @@ -71,18 +71,18 @@ # # Function that starts the daemon/service # -do_start() +start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - start_daemon $DAEMON -b $ARG_CONFIG + $DAEMON -b $ARG_CONFIG RET=$? if [ $RET -eq 2 ]; then - log_failure_msg "start_daemon failed to start btnx with full path. Trying without" - start_daemon $NAME -b $ARG_CONFIG + echo "start_daemon failed to start btnx with full path. Trying without" + $NAME -b $ARG_CONFIG RET=$? fi return $RET @@ -91,7 +91,7 @@ # # Function that stops the daemon/service # -do_stop() +stop() { # Return # 0 if daemon has been stopped @@ -110,11 +110,11 @@ # [ $I -lt 1 ] && return 2 #done - start_daemon $DAEMON -k + $DAEMON -k RET=$? if [ $RET -eq 2 ]; then - log_failure_msg "start_daemon failed to stop btnx with full path. Trying without" - start_daemon $NAME -k + echo "start_daemon failed to stop btnx with full path. Trying without" + $NAME -k RET=$? fi return $RET @@ -143,7 +143,7 @@ check_handlers [ $? -ne 0 ] && exit 1 #do_stop - do_start + start RET=$? case "$RET" in 0) @@ -160,7 +160,7 @@ ;; stop) echo "Stopping $NAME :" "$DESC" >&2 - do_stop + stop case "$?" in 0|1) echo "btnx successfully stopped" @@ -189,12 +189,12 @@ # 'force-reload' alias # echo "Restarting $NAME :" "$DESC" >&2 - do_stop + stop case "$?" in 0|1) echo "btnx successfully stopped" #log_success_msg "btnx successfully stopped" - do_start + start RET=$? case "$RET" in 0)