summaryrefslogtreecommitdiffstats
path: root/system/cdemu-daemon/doinst.sh
diff options
context:
space:
mode:
author Niels Horn2011-10-04 15:15:58 +0200
committer Robby Workman2011-10-12 04:20:28 +0200
commit98d02cc48f4763845f174c4061fdf8e109c056c4 (patch)
treea683bfec23bf33a333ad0524b6bb44224f382436 /system/cdemu-daemon/doinst.sh
parentc7b6e320db7873555b05b7de04d4d89c40a34de1 (diff)
downloadslackbuilds-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.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