summaryrefslogtreecommitdiffstats
path: root/system/tpe-kmod/doinst.sh
diff options
context:
space:
mode:
author pyllyukko <pyllyukko@maimed.org>2019-06-15 07:29:23 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2019-06-15 07:29:23 +0700
commitb78040fcf6930c9a96325e02044fc300a55f84be (patch)
tree226fcd39b88f229c18e9f6c595cc090c14f030f6 /system/tpe-kmod/doinst.sh
parent40b67c6a0a733d4789f761106ca76e6761527c72 (diff)
downloadslackbuilds-b78040fcf6930c9a96325e02044fc300a55f84be.tar.gz
slackbuilds-b78040fcf6930c9a96325e02044fc300a55f84be.tar.xz
system/tpe-kmod: Added (Trusted Path Execution Linux Kernel Module).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/tpe-kmod/doinst.sh')
-rw-r--r--system/tpe-kmod/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/tpe-kmod/doinst.sh b/system/tpe-kmod/doinst.sh
new file mode 100644
index 0000000000..ecc1b57efb
--- /dev/null
+++ b/system/tpe-kmod/doinst.sh
@@ -0,0 +1,15 @@
+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/modprobe.d/tpe.conf.new
+config etc/sysctl.d/tpe.conf.new