Wolfgang Rosenauer 2011-05-03 20:17:00 +00:00 committed by Git OBS Bridge
parent 3e0eadba69
commit 0ffe36fb72
2 changed files with 16 additions and 1 deletions

View File

@ -45,8 +45,18 @@ if [ -f /etc/sysconfig/pcscd ] ; then
. /etc/sysconfig/pcscd . /etc/sysconfig/pcscd
fi 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() { start() {
echo -n "Starting PC/SC smart card daemon ($prog): " echo -n "Starting PC/SC smart card daemon ($prog): "
cleanup
startproc $exec $PCSCD_OPTIONS startproc $exec $PCSCD_OPTIONS
retval=$? retval=$?
rc_status rc_status
@ -58,7 +68,7 @@ stop() {
killproc $exec killproc $exec
retval=$? retval=$?
rc_status rc_status
[ $retval -eq 0 ] && rm -f $lockfile && rm -f /var/run/pcscd/* [ $retval -eq 0 ] && rm -f $lockfile
rc_status -v rc_status -v
} }
restart() { restart() {

View File

@ -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 Mon May 2 22:26:56 UTC 2011 - wr@rosenauer.org