From 5a65c35479f267b026c03e195658ef9d98ee519c Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 1 Aug 2021 13:11:18 -0400 Subject: [PATCH] port LKRG compatibility settings automation for VirtualBox hosts from systemd to dpkg trigger --- debian/security-misc.postinst | 6 ++++++ debian/security-misc.triggers | 3 +++ lib/systemd/system/lkrg.service.d/40-virtualbox.conf | 5 ----- 3 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 lib/systemd/system/lkrg.service.d/40-virtualbox.conf diff --git a/debian/security-misc.postinst b/debian/security-misc.postinst index f2c3404..7cc831b 100644 --- a/debian/security-misc.postinst +++ b/debian/security-misc.postinst @@ -29,6 +29,12 @@ case "$1" in abort-upgrade|abort-remove|abort-deconfigure) ;; + triggered) + echo "INFO: triggered $DPKG_MAINTSCRIPT_PACKAGE: '$DPKG_MAINTSCRIPT_PACKAGE' $DPKG_MAINTSCRIPT_PACKAGE DPKG_MAINTSCRIPT_NAME: '$DPKG_MAINTSCRIPT_NAME' $\@: '$@' 2: '$2'" + /usr/share/security-misc/lkrg/lkrg-virtualbox || true + exit 0 + ;; + *) echo "$DPKG_MAINTSCRIPT_NAME called with unknown argument \`$1'" >&2 exit 1 diff --git a/debian/security-misc.triggers b/debian/security-misc.triggers index cf92b83..3c09f14 100644 --- a/debian/security-misc.triggers +++ b/debian/security-misc.triggers @@ -9,4 +9,7 @@ ## Activate initramfs hook that sets the sysctl values before init is executed. activate-noawait update-initramfs +## LKRG /usr/share/security-misc/lkrg/lkrg-virtualbox +interest-noawait /usr/bin/vboxmanage + #### meta end diff --git a/lib/systemd/system/lkrg.service.d/40-virtualbox.conf b/lib/systemd/system/lkrg.service.d/40-virtualbox.conf deleted file mode 100644 index 346f861..0000000 --- a/lib/systemd/system/lkrg.service.d/40-virtualbox.conf +++ /dev/null @@ -1,5 +0,0 @@ -## Copyright (C) 2021 - 2021 ENCRYPTED SUPPORT LP -## See the file COPYING for copying conditions. - -[Service] -ExecStartPre=/usr/share/security-misc/lkrg/lkrg-virtualbox