diff options
author | Robby Workman <rw@rlworkman.net> | 2010-05-11 19:46:20 +0200 |
---|---|---|
committer | Alan Hicks <alan@lizella.net> | 2010-05-11 19:46:20 +0200 |
commit | 6eea7026fb6bb92eb0f59979dbb4de618fa451bb (patch) | |
tree | 8d5a2806196f7c6387d62183d48a90c739bdd3d0 /system/apcupsd/doinst.sh | |
parent | 26c4dd962086c59d6571068ce10179cf190991ce (diff) |
system/apcupsd: Updated for version 3.14.3
Diffstat (limited to 'system/apcupsd/doinst.sh')
-rw-r--r-- | system/apcupsd/doinst.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/system/apcupsd/doinst.sh b/system/apcupsd/doinst.sh index f393efaa2205..066579eb4b0e 100644 --- a/system/apcupsd/doinst.sh +++ b/system/apcupsd/doinst.sh @@ -1,10 +1,10 @@ config() { NEW="$1" - OLD="`dirname $NEW`/`basename $NEW .new`" + OLD="$(dirname $NEW)/$(basename $NEW .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD - elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy rm $NEW fi @@ -30,5 +30,12 @@ do \ config etc/apcupsd/$i; done +# Keep same perms on rc.apcupsd.new: +if [ -e etc/rc.d/rc.apcupsd ]; then + cp -a etc/rc.d/rc.apcupsd etc/rc.d/rc.apcupsd.new.incoming + cat etc/rc.d/rc.apcupsd.new > etc/rc.d/rc.apcupsd.new.incoming + mv etc/rc.d/rc.apcupsd.new.incoming etc/rc.d/rc.apcupsd.new +fi + config etc/rc.d/rc.apcupsd.new |