summaryrefslogtreecommitdiff
path: root/system/lapsus/doinst.sh
diff options
context:
space:
mode:
authorHeinz Wiesinger <HMWiesinger@gmx.at>2010-05-11 20:02:01 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 20:02:01 +0200
commitddce670a824a0416c17d9d5532c795b96815b548 (patch)
treed9a7a26ee35ec29f5203f221a1f131e5106a0199 /system/lapsus/doinst.sh
parent16808fc8cf5aa630e98fff836dc6a34e3315d6ff (diff)
downloadslackbuilds-ddce670a824a0416c17d9d5532c795b96815b548.tar.gz
system/lapsus: Added to 12.0 repository
Diffstat (limited to 'system/lapsus/doinst.sh')
-rw-r--r--system/lapsus/doinst.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/system/lapsus/doinst.sh b/system/lapsus/doinst.sh
new file mode 100644
index 0000000000..658afbcb90
--- /dev/null
+++ b/system/lapsus/doinst.sh
@@ -0,0 +1,23 @@
+config() {
+ NEW="$1"
+ 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
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.lapsus.new:
+if [ -e etc/rc.d/rc.lapsus ]; then
+ cp -a etc/rc.d/rc.lapsus etc/rc.d/rc.lapsus.new.incoming
+ cat etc/rc.d/rc.lapsus.new > etc/rc.d/rc.lapsus.new.incoming
+ mv etc/rc.d/rc.lapsus.new.incoming etc/rc.d/rc.lapsus.new
+fi
+
+config etc/rc.d/rc.lapsus.new
+config etc/dbus-1/system.d/lapsus.conf.new
+