From b78040fcf6930c9a96325e02044fc300a55f84be Mon Sep 17 00:00:00 2001 From: pyllyukko Date: Sat, 15 Jun 2019 07:29:23 +0700 Subject: system/tpe-kmod: Added (Trusted Path Execution Linux Kernel Module). Signed-off-by: Willy Sudiarto Raharjo --- system/tpe-kmod/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 system/tpe-kmod/doinst.sh (limited to 'system/tpe-kmod/doinst.sh') diff --git a/system/tpe-kmod/doinst.sh b/system/tpe-kmod/doinst.sh new file mode 100644 index 000000000000..ecc1b57efbd3 --- /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 -- cgit v1.2.3