packages: git-core/git-core.init - unify
glen
glen at pld-linux.org
Thu Oct 14 16:03:17 CEST 2010
Author: glen Date: Thu Oct 14 14:03:17 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- unify
---- Files affected:
packages/git-core:
git-core.init (1.4 -> 1.5)
---- Diffs:
================================================================
Index: packages/git-core/git-core.init
diff -u packages/git-core/git-core.init:1.4 packages/git-core/git-core.init:1.5
--- packages/git-core/git-core.init:1.4 Sun Nov 16 12:41:16 2008
+++ packages/git-core/git-core.init Thu Oct 14 16:03:10 2010
@@ -22,7 +22,7 @@
# Check that networking is up.
if is_yes "${NETWORKING}"; then
if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
- msg_network_down git-daemon
+ msg_network_down "git-daemon"
exit 1
fi
else
@@ -31,46 +31,50 @@
start() {
# Check if the service is already running?
- if [ ! -f /var/lock/subsys/git-daemon ]; then
- msg_starting git-daemon
- daemon --fork @libdir@/git-core/git-daemon $DAEMON_OPTS
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/git-daemon
- else
- msg_already_running git-daemon
+ if [ -f /var/lock/subsys/git-daemon ]; then
+ msg_already_running "git-daemon"
+ return
fi
+
+ msg_starting "git-daemon"
+ daemon --fork @libdir@/git-core/git-daemon $DAEMON_OPTS
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/git-daemon
}
stop() {
- if [ -f /var/lock/subsys/git-daemon ]; then
- # Stop daemons.
- msg_stopping git-daemon
- killproc git-daemon
- rm -f /var/lock/subsys/git-daemon
- else
- msg_not_running git-daemon
+ if [ ! -f /var/lock/subsys/git-daemon ]; then
+ msg_not_running "git-daemon"
+ return
fi
+
+ # Stop daemons.
+ msg_stopping "git-daemon"
+ killproc git-daemon
+ rm -f /var/lock/subsys/git-daemon
}
reload() {
- if [ -f /var/lock/subsys/git-daemon ]; then
- msg_reloading git-daemon
- killproc git-daemon -HUP
- RETVAL=$?
- else
- msg_not_running git-daemon
+ if [ ! -f /var/lock/subsys/git-daemon ]; then
+ msg_not_running "git-daemon"
RETVAL=7
+ return
fi
+
+ msg_reloading "git-daemon"
+ killproc git-daemon -HUP
+ RETVAL=$?
}
condrestart() {
- if [ -f /var/lock/subsys/git-daemon ]; then
- stop
- start
- else
- msg_not_running git-daemon
+ if [ ! -f /var/lock/subsys/git-daemon ]; then
+ msg_not_running "git-daemon"
RETVAL=$1
+ return
fi
+
+ stop
+ start
}
RETVAL=0
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/git-core/git-core.init?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list