summaryrefslogtreecommitdiff
path: root/system/opendoas/doinst.sh
diff options
context:
space:
mode:
authorK. Eugene Carlson <kvngncrlsn@gmail.com>2021-03-12 18:22:29 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-03-13 09:02:39 +0700
commitbe930a2e0122f3c6bd14e81872f755e8cdd11877 (patch)
tree81c0d99a66ce9f2d66a9958c54d5c2dd17e3a9ed /system/opendoas/doinst.sh
parentf8fabf06f8a28e8a3de4fb05b95714f1763e0d41 (diff)
downloadslackbuilds-be930a2e0122f3c6bd14e81872f755e8cdd11877.tar.gz
system/opendoas: Added (port of doas from OpenBSD)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/opendoas/doinst.sh')
-rw-r--r--system/opendoas/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/opendoas/doinst.sh b/system/opendoas/doinst.sh
new file mode 100644
index 0000000000..97b05239d4
--- /dev/null
+++ b/system/opendoas/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/pam.d/doas.new