From 891451029b003affee6a9e93a17cce99a6580fb0 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Fri, 25 Nov 2011 14:34:32 +0000 Subject: [PATCH] debian/pcscd.init: Fix "init.d status support" (Closes: #644127) --- debian/changelog | 3 ++- debian/pcscd.init | 27 ++++++++++----------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index e43cabb..657323f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ pcsc-lite (1.8.1-1) unstable; urgency=low * New upstream release * debian/copyright: use Machine-readable DEP-5 format + * debian/pcscd.init: Fix "init.d status support" (Closes: #644127) - -- Ludovic Rousseau Fri, 25 Nov 2011 15:26:11 +0100 + -- Ludovic Rousseau Fri, 25 Nov 2011 15:33:16 +0100 pcsc-lite (1.7.4-2) unstable; urgency=low diff --git a/debian/pcscd.init b/debian/pcscd.init index c0baa8f..d5a561d 100644 --- a/debian/pcscd.init +++ b/debian/pcscd.init @@ -32,12 +32,6 @@ SCRIPTNAME=/etc/init.d/$NAME # /etc/default/pcscd and add a line # DAEMON_ARGS="--your-option" -# create $IPCDIR with correct access rights -rm -rf $IPCDIR -mkdir $IPCDIR -chgrp pcscd $IPCDIR -chmod g+w $IPCDIR - # DO NOT start the daemon on startup # comment the line to have the same behavior as in version < 1.6.0 exit 0 @@ -68,6 +62,12 @@ eval LANG=$value # do_start() { + # create $IPCDIR with correct access rights + rm -rf $IPCDIR + mkdir $IPCDIR + chgrp pcscd $IPCDIR + chmod g+w $IPCDIR + # Return # 0 if daemon has been started # 1 if daemon was already running @@ -127,15 +127,9 @@ case "$1" in 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; + status) + status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $? + ;; restart|force-reload) # # If the "reload" option is implemented then remove the @@ -159,8 +153,7 @@ case "$1" in esac ;; *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac