diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-06 09:45:21 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-08 17:28:29 -0500 |
commit | f1d0ad19330c134d7c41d1c56f240b7b50119b81 (patch) | |
tree | fda29edef08d61f1c94ab8575dbd9e883e1e16f8 /system/udevil/doinst.sh | |
parent | 111c0170c751d9ab8f8d2487ea5120dace824650 (diff) | |
download | slackbuilds-f1d0ad19330c134d7c41d1c56f240b7b50119b81.tar.gz |
system/udevil: Added (removable devices manager).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/udevil/doinst.sh')
-rw-r--r-- | system/udevil/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/udevil/doinst.sh b/system/udevil/doinst.sh new file mode 100644 index 0000000000..e7044ad72d --- /dev/null +++ b/system/udevil/doinst.sh @@ -0,0 +1,14 @@ +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... +} + +config etc/udevil/udevil.conf.new |