diff options
author | LukenShiro <lukenshiro@ngi.it> | 2011-12-14 12:38:15 -0600 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-12-18 00:07:48 -0200 |
commit | 498d5573f5aa26e794d20dd8deb35bb3cfc5c2e7 (patch) | |
tree | 30bb624d64f70e0cc2f6506fecfe7a024476758e /system/pcsc-lite/doinst.sh | |
parent | e499cbd273f0cbf37e6d31ca4c51c5a2eee87853 (diff) |
system/pcsc-lite: Updated for version 1.8.1.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/pcsc-lite/doinst.sh')
-rw-r--r-- | system/pcsc-lite/doinst.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/system/pcsc-lite/doinst.sh b/system/pcsc-lite/doinst.sh index 5086b84736149..713fd54d6eef0 100644 --- a/system/pcsc-lite/doinst.sh +++ b/system/pcsc-lite/doinst.sh @@ -11,11 +11,15 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -if [ -e etc/rc.d/rc.pcscd ]; then - cp -a etc/rc.d/rc.pcscd etc/rc.d/rc.pcscd.new.incoming - cat etc/rc.d/rc.pcscd.new > etc/rc.d/rc.pcscd.new.incoming - mv etc/rc.d/rc.pcscd.new.incoming etc/rc.d/rc.pcscd.new -fi - -config etc/rc.d/rc.pcscd.new +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} +preserve_perms etc/rc.d/rc.pcscd.new |