From 98d02cc48f4763845f174c4061fdf8e109c056c4 Mon Sep 17 00:00:00 2001 From: Niels Horn Date: Tue, 4 Oct 2011 08:15:58 -0500 Subject: system/cdemu-daemon: Updated for version 1.4.0. Signed-off-by: Erik Hanson --- system/cdemu-daemon/doinst.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'system/cdemu-daemon/doinst.sh') 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 -- cgit v1.2.3