summaryrefslogtreecommitdiff
path: root/system/cdemu-daemon/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'system/cdemu-daemon/doinst.sh')
-rw-r--r--system/cdemu-daemon/doinst.sh19
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