diff options
author | Kyle Guinn | 2014-01-15 03:27:17 +0100 |
---|---|---|
committer | Erik Hanson | 2014-01-30 06:21:02 +0100 |
commit | 8892b6edc22f2770f1bd83f62ef505faf284e0ff (patch) | |
tree | 36c040412b275cc7073c6ef56e8479355401d945 /system/pmount/doinst.sh | |
parent | 5bb964d8199d35ecb397c240ebf78393377b3c7d (diff) | |
download | slackbuilds-8892b6edc22f2770f1bd83f62ef505faf284e0ff.tar.gz |
system/pmount: Added (mount removable devices as normal user).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/pmount/doinst.sh')
-rw-r--r-- | system/pmount/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/system/pmount/doinst.sh b/system/pmount/doinst.sh new file mode 100644 index 0000000000..f34d4a61bb --- /dev/null +++ b/system/pmount/doinst.sh @@ -0,0 +1,15 @@ +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/pmount.allow.new + |