depends on dracut selinux module

depends on 98selinux if 1st kernel selinux is enabled so we can load_policy
and correctly label the vmcore/vmcore-dmesg files.

Since dracut always mount rootfs, the 98selinux will chroot and load_policy,
so this will be ok for Fedora. In case rootfs mount failure we have to check
and relable vmcore files, will add the kdumpctl relabeling code in another
patch.

add 'dracut_args --printsize' to /etc/kdump.conf, it shows below added size:
selinux install size: 16k

Tested on F19:
With this patch applied, vmcore selinux attr is ok.

v1->v2: use sestatus 2>/dev/null to mute error messages

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
dyoung@redhat.com 2013-06-05 16:01:17 +08:00 committed by Baoquan He
parent 387a6de171
commit b156ef0d68
1 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,12 @@ check() {
}
depends() {
echo "base shutdown"
local _dep="base shutdown"
if sestatus 2>/dev/null | grep -q "SELinux status.*enabled"; then
_dep="$_dep selinux"
fi
echo $_dep
return 0
}