mcstrans/mcstrans-0.3.1-init.patch

66 lines
1.2 KiB
Diff
Raw Normal View History

2009-09-17 09:44:36 +00:00
--- mcstrans-0.3.1/src/mcstrans.init~ 2009-09-16 11:01:17.646738932 +0200
+++ mcstrans-0.3.1/src/mcstrans.init 2009-09-16 11:23:47.605763983 +0200
@@ -20,6 +20,7 @@
PATH=/sbin:/bin:/usr/bin:/usr/sbin
prog="mcstransd"
+lockfile=/var/lock/subsys/$prog
# Source function library.
. /etc/init.d/functions
@@ -54,7 +55,7 @@
RETVAL=$?
echo
if test $RETVAL = 0 ; then
- touch /var/lock/subsys/mcstrans
+ touch $lockfile
fi
return $RETVAL
}
@@ -64,15 +65,7 @@
killproc $prog
RETVAL=$?
echo
- rm -f /var/lock/subsys/mcstrans
- return $RETVAL
-}
-
-reload(){
- echo -n $"Reloading configuration: "
- killproc $prog -HUP
- RETVAL=$?
- echo
+ rm -f $lockfile
return $RETVAL
}
@@ -82,7 +75,7 @@
}
condrestart(){
- [ -e /var/lock/subsys/mcstrans ] && restart
+ [ -e $lockfile ] && restart
return 0
}
@@ -95,17 +88,14 @@
stop)
stop
;;
- restart)
+ restart|force-reload)
restart
;;
- reload)
- reload
- ;;
condrestart)
condrestart
;;
*)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|rotate}"
+ echo $"Usage: $0 {start|stop|status|restart|force-reload|condrestart}"
RETVAL=3
esac