some minor corrections for ulogd initscript
S.Çağlar Onur [Thu, 28 Jan 2010 16:00:57 +0000 (16:00 +0000)]
ulogd.init

index 938bb28..cd110c7 100755 (executable)
@@ -7,25 +7,33 @@
 
 . /etc/rc.d/init.d/functions
 
-
 function start()
 {
-       printf "Starting %s: " "ulogd"
-       daemon /usr/sbin/ulogd -d
-       echo
-       touch /var/lock/subsys/ulogd
+       pid=`pidof ulogd`
+       if [ "x$pid" == "x" ]; then
+               echo -n $"Starting $prog: "
+               daemon /usr/sbin/ulogd -d || exit $?
+               echo
+               touch /var/lock/subsys/ulogd
+       else
+               echo $"$prog is already running."
+       fi
 }
 
 
 function stop()
 {
-       printf "Stopping %s: " "ulogd"
-       killproc ulogd
-       echo
-       rm -f /var/lock/subsys/ulogd
+       pid=`pidof ulogd`
+       if [ "x$pid" != "x" ]; then
+               echo -n $"Stopping $prog: "
+               killproc ulogd || exit $?
+               echo
+               rm -f /var/lock/subsys/ulogd
+       else
+               echo $"$prog is already stopped."
+       fi
 }
 
-
 function reload()
 {
        pid=`pidof ulogd`