add opendoas
[slackbuilds.git] / opendoas / doinst.sh
blob97b05239d4808d8ccb8c93af4eda23cd9aa454dc
1 config() {
2 NEW="$1"
3 OLD="$(dirname $NEW)/$(basename $NEW .new)"
4 # If there's no config file by that name, mv it over:
5 if [ ! -r $OLD ]; then
6 mv $NEW $OLD
7 elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
8 # toss the redundant copy
9 rm $NEW
11 # Otherwise, we leave the .new copy for the admin to consider...
14 config etc/pam.d/doas.new