diff options
author | Niels Horn <niels.horn@gmail.com> | 2011-10-04 08:15:58 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-10-11 21:20:28 -0500 |
commit | 98d02cc48f4763845f174c4061fdf8e109c056c4 (patch) | |
tree | a683bfec23bf33a333ad0524b6bb44224f382436 /system/cdemu-daemon/doinst.sh | |
parent | c7b6e320db7873555b05b7de04d4d89c40a34de1 (diff) | |
download | slackbuilds-98d02cc48f4763845f174c4061fdf8e109c056c4.tar.gz |
system/cdemu-daemon: Updated for version 1.4.0.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'system/cdemu-daemon/doinst.sh')
-rw-r--r-- | system/cdemu-daemon/doinst.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/system/cdemu-daemon/doinst.sh b/system/cdemu-daemon/doinst.sh index f984fef7d7..31fe07a000 100644 --- a/system/cdemu-daemon/doinst.sh +++ b/system/cdemu-daemon/doinst.sh @@ -10,15 +10,18 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.cdemud.new: -if [ -e etc/rc.d/rc.cdemud ]; then - cp -a etc/rc.d/rc.cdemud etc/rc.d/rc.cdemud.new.incoming - cat etc/rc.d/rc.cdemud.new > etc/rc.d/rc.cdemud.new.incoming - mv etc/rc.d/rc.cdemud.new.incoming etc/rc.d/rc.cdemud.new -fi +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 +} -config etc/rc.d/rc.cdemud.new -config etc/rc.d/rc.cdemud.conf.new +preserve_perms etc/rc.d/rc.cdemud.new config etc/dbus-1/system.d/cdemud-dbus.conf.new config etc/udev/rules.d/99-vhba.rules.new |