From ddce670a824a0416c17d9d5532c795b96815b548 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Tue, 11 May 2010 20:02:01 +0200 Subject: system/lapsus: Added to 12.0 repository --- system/lapsus/doinst.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 system/lapsus/doinst.sh (limited to 'system/lapsus/doinst.sh') 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 + -- cgit v1.2.3