]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base: fix selinux handling if .autorelabel is present
authorHarald Hoyer <harald@redhat.com>
Wed, 27 Jan 2010 15:09:15 +0000 (16:09 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 27 Jan 2010 15:09:15 +0000 (16:09 +0100)
rhbz#557744

modules.d/99base/selinux-loadpolicy.sh

index 9e95b8de95e925f44fca81c44b135edd048de2d2..5b91ee681fe051545e9032f1d7dff81227d64639 100755 (executable)
@@ -37,6 +37,8 @@ rd_load_policy()
        } 2>&1 | vinfo
 
        if [ $ret -eq 0 -o $ret -eq 2 ]; then
+           # If machine requires a relabel, force to permissive mode
+           [ -e "$NEWROOT"/.autorelabel ] && ( echo 0 > "$NEWROOT"/selinux/enforce )
            return 0
        fi