From 6eea7026fb6bb92eb0f59979dbb4de618fa451bb Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Tue, 11 May 2010 19:46:20 +0200 Subject: system/apcupsd: Updated for version 3.14.3 --- system/apcupsd/doinst.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'system/apcupsd/doinst.sh') 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 -- cgit v1.2.3