diff options
author | Guillem Jover <guillem@debian.org> | 2009-08-18 03:38:58 +0000 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2010-06-10 23:21:25 +0200 |
commit | 4c28cb4a9990340901bf7079e1f92f8e04acc953 (patch) | |
tree | 212379d89130d2426cae78b095226c5f5e291461 | |
parent | 3f7a23a1a66e3eeebf42fc35a76f057903e19119 (diff) | |
download | inetutils-4c28cb4a9990340901bf7079e1f92f8e04acc953.tar.gz |
Use a variable instead of hardcoding the pid file path
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/inetutils-inetd.init | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index 9a4f71c..048b87b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ inetutils (2:1.6-2) UNRELEASED; urgency=low * Use $(filter ...) instead of $(findstring ...) to extract space separated options from DEB_BUILD_OPTIONS in debian/rules. * Add support for LSB status action on init scripts. + * Use a variable instead of hardcoding the pid file path in inetutils-inetd + init script. -- Guillem Jover <guillem@debian.org> Sat, 18 Apr 2009 01:26:42 +0200 diff --git a/debian/inetutils-inetd.init b/debian/inetutils-inetd.init index f12ed22..8858076 100644 --- a/debian/inetutils-inetd.init +++ b/debian/inetutils-inetd.init @@ -14,6 +14,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/inetutils-inetd NAME=inetd DESC="internet superserver" +PIDFILE=/var/run/$NAME.pid test -x $DAEMON || exit 0 @@ -34,30 +35,30 @@ case "$1" in start) check_no_services log_daemon_msg "Starting $DESC" "$NAME" - start-stop-daemon --start --quiet --oknodo \ - --pidfile /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE \ + --exec $DAEMON log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" - start-stop-daemon --stop --quiet --oknodo \ - --pidfile /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \ + --exec $DAEMON log_end_msg $? ;; reload|force-reload) log_action_begin_msg "Reloading $DESC configuration files" - start-stop-daemon --stop --signal 1 --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE \ + --exec $DAEMON log_action_end_msg $? ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" - start-stop-daemon --stop --quiet --oknodo --pidfile \ - /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \ + --exec $DAEMON check_no_services sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON log_end_msg $? ;; status) |