diff --git a/scripts/cmirrord_init_red_hat.in b/scripts/cmirrord_init_red_hat.in index 025814d21..c367f53e5 100755 --- a/scripts/cmirrord_init_red_hat.in +++ b/scripts/cmirrord_init_red_hat.in @@ -19,42 +19,42 @@ PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/sbin" start() { - echo -n "Starting clustered mirror log server:" + echo -n "Starting clustered mirror log server:" ps -C cmirrord >& /dev/null || cmirrord >& /dev/null rtrn=$? - if [ $rtrn -eq 0 ]; then - success "startup" - else - failure "startup" - fi + if [ $rtrn -eq 0 ]; then + success "startup" + else + failure "startup" + fi - # need the extra echo to properly terminate the line - echo - return $rtrn + # need the extra echo to properly terminate the line + echo + return $rtrn } stop() { - echo -n "Stopping clustered mirror log server:" + echo -n "Stopping clustered mirror log server:" killall cmirrord >& /dev/null for ((i=0; $i < 10; i++)); do - if ! ps -C cmirrord >& /dev/null; then - break; - fi - sleep 1 + if ! ps -C cmirrord >& /dev/null; then + break; + fi + sleep 1 done if [ $i -ge 10 ]; then - failure "shutdown" - echo - return 1 + failure "shutdown" + echo + return 1 else - success "shutdown" + success "shutdown" fi echo - return $rtrn + return $rtrn } cmirror_status() @@ -72,33 +72,33 @@ rtrn=1 # See how we were called. case "$1" in - start) - start - rtrn=$? - ;; + start) + start + rtrn=$? + ;; - stop) - stop - rtrn=$? - ;; + stop) + stop + rtrn=$? + ;; - restart) - $0 stop - $0 start - rtrn=$? - ;; + restart) + $0 stop + $0 start + rtrn=$? + ;; - status) - cmirror_status - rtrn=$? - if [ $rtrn -eq 0 ]; then - echo "cmirror is running." - fi - ;; + status) + cmirror_status + rtrn=$? + if [ $rtrn -eq 0 ]; then + echo "cmirror is running." + fi + ;; - *) - echo $"Usage: $0 {start|stop|restart|status}" - ;; + *) + echo $"Usage: $0 {start|stop|restart|status}" + ;; esac exit $rtrn