SOURCES: rsync.init - fixed force-reload, added try-restart, dropp...

qboosh qboosh at pld-linux.org
Fri Mar 7 19:41:57 CET 2008


Author: qboosh                       Date: Fri Mar  7 18:41:57 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixed force-reload, added try-restart, dropped force-restart

---- Files affected:
SOURCES:
   rsync.init (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SOURCES/rsync.init
diff -u SOURCES/rsync.init:1.10 SOURCES/rsync.init:1.11
--- SOURCES/rsync.init:1.10	Fri Mar  7 09:35:53 2008
+++ SOURCES/rsync.init	Fri Mar  7 19:41:52 2008
@@ -50,6 +50,16 @@
 	fi
 }
 
+condrestart() {
+	if [ -f /var/lock/subsys/rsyncd ]; then
+		stop
+		start
+	else
+		msg_not_running rsyncd
+		RETVAL=$1
+	fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -59,16 +69,22 @@
   stop)
   	stop
 	;;
-  restart|force-restart|force-reload)
+  restart)
 	stop
 	start
 	;;
+  try-restart)
+	condrestart 0
+	;;
+  force-reload)
+	condrestart 7
+	;;
   status)
 	status rsyncd rsync
 	exit $?
 	;;
   *)
-	msg_usage "$0 {start|stop|restart|force-restart|force-reload|status}"
+	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
 	exit 3
 esac
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rsync.init?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list