diff options
Diffstat (limited to 'desktop/slim/doinst.sh')
-rw-r--r-- | desktop/slim/doinst.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/desktop/slim/doinst.sh b/desktop/slim/doinst.sh index de76815af0cf..49a1fd722948 100644 --- a/desktop/slim/doinst.sh +++ b/desktop/slim/doinst.sh @@ -2,16 +2,24 @@ 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 # Otherwise, we leave the .new copy for the admin to consider... } -config /etc/slim.conf.new -config /etc/rc.d/rc.slim.new +# Keep same perms on rc.slim.new: +if [ -e etc/rc.d/rc.slim ]; then + cp -a etc/rc.d/rc.slim etc/rc.d/rc.slim.new.incoming + cat etc/rc.d/rc.slim.new > etc/rc.d/rc.slim.new.incoming + mv etc/rc.d/rc.slim.new.incoming etc/rc.d/rc.slim.new +fi + +config etc/rc.d/rc.slim.new +config etc/slim.conf.new + |