summaryrefslogtreecommitdiff
path: root/system/passwdqc/doinst.sh
diff options
context:
space:
mode:
authorpyllyukko <pyllyukko@maimed.org>2014-05-27 23:19:09 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-05-28 23:45:44 +0700
commit471e62a3bab3e924db4abb19a5d9d20da8e54989 (patch)
treefc271d96760673ba8db4d8290e8d0e04eb46619c /system/passwdqc/doinst.sh
parent898a169d5e22b57494639b98c87c9a80b33560db (diff)
downloadslackbuilds-471e62a3bab3e924db4abb19a5d9d20da8e54989.tar.gz
system/passwdqc: Added (password/passphrase strength checking).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/passwdqc/doinst.sh')
-rw-r--r--system/passwdqc/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/passwdqc/doinst.sh b/system/passwdqc/doinst.sh
new file mode 100644
index 0000000000..880fbffca1
--- /dev/null
+++ b/system/passwdqc/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/passwdqc.conf.new