diff options
author | Nathan Kinder <nkinder@redhat.com> | 2009-01-14 17:19:32 +0000 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2009-01-14 17:19:32 +0000 |
commit | e4c899f022ffdc917d5b7a6a828325d6d5e3a09e (patch) | |
tree | 13b7004372571a374e7ad8293dae1162fb2a8ad4 /wrappers | |
parent | b3799947308f45e3dac391bb73c09ecf359fdb92 (diff) | |
download | ds-e4c899f022ffdc917d5b7a6a828325d6d5e3a09e.tar.gz ds-e4c899f022ffdc917d5b7a6a828325d6d5e3a09e.tar.xz ds-e4c899f022ffdc917d5b7a6a828325d6d5e3a09e.zip |
Resolves: 253311
Summary: Clean up formatting of init script output.
Diffstat (limited to 'wrappers')
-rw-r--r-- | wrappers/initscript.in | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/wrappers/initscript.in b/wrappers/initscript.in index a4a8e48e..391e5676 100644 --- a/wrappers/initscript.in +++ b/wrappers/initscript.in @@ -143,7 +143,8 @@ start() { successes=`expr $successes + 1` server_running=1 else - echo_n " not running, but pid file exists - attempt to start anyway..." + echo " not running, but pid file exists" + echo_n " $instance... attempting to start anyway" rm -f $pidfile fi fi @@ -218,10 +219,10 @@ start() { touch $lockfile fi if [ $errors -ge 1 ]; then - echo "*** Warning: $errors instance(s) failed to start" + echo " *** Warning: $errors instance(s) failed to start" fi else - echo "*** Error: no $prog instances configured" + echo " *** Error: no $prog instances configured" fi } @@ -229,10 +230,10 @@ stop() { echo "Shutting down $prog: " errors=0 for instance in $INSTANCES; do + echo_n " $instance..." pidfile=$piddir/slapd-$instance.pid if [ -f $pidfile ]; then pid=`cat $pidfile` - echo_n " $instance..." server_stopped=0 if kill -0 $pid > /dev/null 2>&1 ; then kill $pid @@ -242,6 +243,10 @@ stop() { failure; echo errors=`expr $errors + 1` fi + else + echo_n " server not running" + failure; echo + errors=`expr $errors + 1` fi if [ $server_stopped -eq 1 ] ; then loop_counter=1 @@ -266,10 +271,14 @@ stop() { rm -f $pidfile fi fi + else + echo_n " server already stopped" + failure; echo + errors=`expr $errors + 1` fi done if [ $errors -ge 1 ]; then - echo_n "*** Error: $errors instance(s) unsuccessfully stopped" + echo_n " *** Error: $errors instance(s) unsuccessfully stopped" failure; echo else rm -f $lockfile |