diff options
author | pyllyukko <pyllyukko@maimed.org> | 2014-05-27 23:19:09 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-05-28 23:45:44 +0700 |
commit | 471e62a3bab3e924db4abb19a5d9d20da8e54989 (patch) | |
tree | fc271d96760673ba8db4d8290e8d0e04eb46619c /system/passwdqc/doinst.sh | |
parent | 898a169d5e22b57494639b98c87c9a80b33560db (diff) |
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.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/passwdqc/doinst.sh b/system/passwdqc/doinst.sh new file mode 100644 index 0000000000000..880fbffca192b --- /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 |