summaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-18 23:38:58 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-18 23:38:58 +0100
commit46f0afdc4631344742bc48b4a9168f9d6cabbe5e (patch)
tree8e7074f73783f14d0e21259671dd60de0fa960b6 /sys-apps
parent7ebab1f136dab0d5c56d8552c58e0bc696411ff1 (diff)
sys-apps/openrc : auto-enable apparmor in boot runlevel
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/openrc/openrc-0.34.11-r7.ebuild (renamed from sys-apps/openrc/openrc-0.34.11-r6.ebuild)15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys-apps/openrc/openrc-0.34.11-r6.ebuild b/sys-apps/openrc/openrc-0.34.11-r7.ebuild
index 4c8b5b5b..48cec60a 100644
--- a/sys-apps/openrc/openrc-0.34.11-r6.ebuild
+++ b/sys-apps/openrc/openrc-0.34.11-r7.ebuild
@@ -18,7 +18,7 @@ fi
LICENSE="BSD-2"
SLOT="0"
-IUSE="audit debug +dkms elogind ncurses pam newnet +plugin prefix +netifrc selinux +settingsd static-libs
+IUSE="+apparmor audit debug +dkms elogind ncurses pam newnet +plugin prefix +netifrc selinux +settingsd static-libs
unicode kernel_linux kernel_FreeBSD"
COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
@@ -27,6 +27,9 @@ COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-proc
sys-auth/pambase
virtual/pam
)
+ apparmor? ( sys-apps/apparmor
+ sys-apps/apparmor-utils
+ )
audit? ( sys-process/audit )
dkms? ( sys-kernel/dkms )
elogind? ( sys-auth/elogind )
@@ -382,4 +385,14 @@ pkg_postinst() {
"${ROOT}"sbin/rc-update del cgmanager default
fi
fi
+
+ #4 : add apparmor service to boot runlevel
+ if [ -e "${ROOT}"/etc/init.d/apparmor ] && use apparmor; then
+ if [ "$(rc-config list boot | grep apparmor)" != "" ]; then
+ ewarn "found apparmor service in boot runlevel, skipping"
+ else
+ ewarn "not found apparmor service in boot runlevel, enabling"
+ "${ROOT}"sbin/rc-update add apparmor boot
+ fi
+ fi
}