summaryrefslogtreecommitdiffstats
path: root/source/a/udisks2/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/udisks2/doinst.sh')
-rw-r--r--source/a/udisks2/doinst.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/a/udisks2/doinst.sh b/source/a/udisks2/doinst.sh
index c186599af..bec035196 100644
--- a/source/a/udisks2/doinst.sh
+++ b/source/a/udisks2/doinst.sh
@@ -1,3 +1,18 @@
+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/udisks2/udisks2.conf.new
+
# udisks2 is stupid about testing files before using them. If /etc/crypttab
# does not exist, it will fill the log with "errors" as it tries to open the
# nonexistent file. There's really no reason that a system without encrypted
@@ -9,4 +24,3 @@ if [ ! -r etc/crypttab ]; then
# echo "HEY, EVERYONE SHOULD HAVE A CRYPTTAB!!!" (just kidding)
touch etc/crypttab
fi
-