diff --git a/pcsc-lite-init b/pcsc-lite-init index c85df66..986bb01 100644 --- a/pcsc-lite-init +++ b/pcsc-lite-init @@ -45,8 +45,18 @@ if [ -f /etc/sysconfig/pcscd ] ; then . /etc/sysconfig/pcscd fi +cleanup() { + # if comm socket exists but pid file is absent pcscd fails to start + # bnc#686674 + if [ -S /var/run/pcscd/pcscd.comm -a ! -e /var/run/pcscd/pcscd.pid ]; then + # check if a pcscd instance is running and remove the socket in case it's not + checkproc $exec || rm /var/run/pcscd/pcscd.comm + fi +} + start() { echo -n "Starting PC/SC smart card daemon ($prog): " + cleanup startproc $exec $PCSCD_OPTIONS retval=$? rc_status @@ -58,7 +68,7 @@ stop() { killproc $exec retval=$? rc_status - [ $retval -eq 0 ] && rm -f $lockfile && rm -f /var/run/pcscd/* + [ $retval -eq 0 ] && rm -f $lockfile rc_status -v } restart() { diff --git a/pcsc-lite.changes b/pcsc-lite.changes index 29484c9..fe46efa 100644 --- a/pcsc-lite.changes +++ b/pcsc-lite.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 3 20:15:49 UTC 2011 - wr@rosenauer.org + +- make startup more robust by checking status files (bnc#686674) + ------------------------------------------------------------------- Mon May 2 22:26:56 UTC 2011 - wr@rosenauer.org