diff --git a/debian/changelog b/debian/changelog index dca1834..76800a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +pcsc-lite (1.5.5-3) unstable; urgency=low + + * debian/update-reader.conf: store the generated configuration file in + /var/lib/pcscd instead of /etc. This should really close #565896. + + -- Ludovic Rousseau Wed, 03 Feb 2010 11:33:58 +0100 + pcsc-lite (1.5.5-2) unstable; urgency=medium * debian/update-reader.conf: add a SHA1 on the first line of the diff --git a/debian/rules b/debian/rules index 344c7c9..dc469b8 100755 --- a/debian/rules +++ b/debian/rules @@ -48,7 +48,7 @@ configure-stamp: # we add LDFLAGS="-lpthread" for bug #253629 ./configure $(confflags) \ - --sysconfdir=/etc \ + --enable-confdir=/var/lib/pcscd \ --prefix=/usr \ --enable-usbdropdir=/usr/lib/pcsc/drivers \ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \ diff --git a/debian/update-reader.conf b/debian/update-reader.conf index abccf85..4b9ca70 100644 --- a/debian/update-reader.conf +++ b/debian/update-reader.conf @@ -23,7 +23,9 @@ # $Id: update-reader.conf,v 1.4 2005-03-24 13:17:57 rousseau Exp $ -CFGFILE=/etc/reader.conf +OLDCFGFILE=/etc/reader.conf +CFGDIR=/var/lib/pcscd +CFGFILE="$CFGDIR/reader.conf" TMPFILE=`mktemp /tmp/reader.conf.XXXXXX` HEADER="### This file is automatically generated by update-reader.conf" @@ -34,6 +36,23 @@ set -e LC_COLLATE=C export LC_COLLATE +if [ 0 -ne "`id -u`" ]; then + echo "You have to be root to run $0" + exit 2 +fi + +if [ ! -d "$CFGDIR" ]; then + mkdir "$CFGDIR" +fi + +if [ -e "$OLDCFGFILE" ]; then + echo "moving the old configuration file $OLDCFGFILE to its new location: $CFGFILE" + mv "$OLDCFGFILE" "$CFGFILE" + if [ -e "$OLDCFGFILE".old ]; then + mv "$OLDCFGFILE".old "$CFGFILE".old + fi +fi + needforce=0 if [ -f "$CFGFILE" ]; then FIRSTLINE=$(head -1 "$CFGFILE") @@ -65,11 +84,6 @@ if [ $needforce -eq 1 ]; then exit 1 fi -if [ 0 -ne "`id -u`" ]; then - echo "You have to be root to run $0" - exit 2 -fi - if [ -e "$CFGFILE" ]; then cp -f "$CFGFILE" "${CFGFILE}.old" fi