Author: glen Date: Tue Sep 11 10:16:24 2007 GMT Module: SOURCES Tag: HEAD ---- Log message: - use functions
---- Files affected: SOURCES: pound.init (1.7 -> 1.8) ---- Diffs: ================================================================ Index: SOURCES/pound.init diff -u SOURCES/pound.init:1.7 SOURCES/pound.init:1.8 --- SOURCES/pound.init:1.7 Thu Dec 8 02:02:49 2005 +++ SOURCES/pound.init Tue Sep 11 12:16:18 2007 @@ -25,10 +25,7 @@ exit 0 fi -RETVAL=0 -# See how we were called. -case "$1" in - start) +start() { # Check if the service is already running? if [ ! -f /var/lock/subsys/pound ]; then msg_starting pound @@ -38,8 +35,9 @@ else msg_already_running pound fi - ;; - stop) +} + +stop() { # Stop daemons. if [ -f /var/lock/subsys/pound ]; then msg_stopping pound @@ -48,15 +46,24 @@ else msg_not_running pound fi +} + +RETVAL=0 +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop ;; status) status pound exit $? ;; restart|force-reload) - $0 stop - $0 start - exit $? + stop + start ;; *) msg_usage "$0 {start|stop|restart|force-reload|status}" ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pound.init?r1=1.7&r2=1.8&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit