]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Do not attempt to load policy if selinux-policy is not installed.
authorWarren Togami <wtogami@redhat.com>
Thu, 21 May 2009 18:34:38 +0000 (14:34 -0400)
committerWarren Togami <wtogami@redhat.com>
Thu, 21 May 2009 18:34:38 +0000 (14:34 -0400)
modules.d/99base/selinux-loadpolicy.sh

index ceece632db51f94a9f711d064966c26b506c0dee..5597c49483570fca6c7ca88263c2468ce938517a 100755 (executable)
@@ -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."