From: Warren Togami Date: Thu, 21 May 2009 18:34:38 +0000 (-0400) Subject: Do not attempt to load policy if selinux-policy is not installed. X-Git-Tag: 0.1~218 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76434898adfb2ea43c2b0291af70dfe260dd8bed;p=thirdparty%2Fdracut.git Do not attempt to load policy if selinux-policy is not installed. --- diff --git a/modules.d/99base/selinux-loadpolicy.sh b/modules.d/99base/selinux-loadpolicy.sh index ceece632d..5597c4948 100755 --- a/modules.d/99base/selinux-loadpolicy.sh +++ b/modules.d/99base/selinux-loadpolicy.sh @@ -1,6 +1,6 @@ #!/bin/sh # FIXME: load selinux policy. this should really be done after we switchroot -[ -x "$NEWROOT/usr/sbin/load_policy" ] && { +[ -x "$NEWROOT/usr/sbin/load_policy" ] && [ -x "$NEWROOT/etc/sysconfig/selinux" ] { chroot $NEWROOT /usr/sbin/load_policy -i if [ $? -eq 3 ]; then echo "Initial SELinux policy load failed and enforcing mode requested."