diff --git a/usr/share/security-misc/lkrg/lkrg-virtualbox b/usr/share/security-misc/lkrg/lkrg-virtualbox index 6ab093a..3e5edc3 100755 --- a/usr/share/security-misc/lkrg/lkrg-virtualbox +++ b/usr/share/security-misc/lkrg/lkrg-virtualbox @@ -6,6 +6,9 @@ #set -x set -e +## provides function: pkg_installed +source /usr/libexec/helper-scripts/package_installed_check.bsh + ## Check if the VirtualBox host software is installed. if ! command -v vboxmanage &>/dev/null ; then ## VirtualBox host software is not installed. @@ -24,7 +27,9 @@ if ! test -f /usr/share/security-misc/lkrg/30-lkrg-virtualbox.conf ; then exit 0 fi -## TODO: check if lkrg is installed. +if ! pkg_installed "lkrg" ; then + exit 0 +fi ## Delete using '--verbose' so user is notified. cp --verbose /usr/share/security-misc/lkrg/30-lkrg-virtualbox.conf /etc/sysctl.d/30-lkrg-virtualbox.conf