]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
selinux-loadpolicy.sh: redirect output of selinux load_policy
authorHarald Hoyer <harald@redhat.com>
Mon, 31 Aug 2009 14:17:27 +0000 (16:17 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 1 Sep 2009 13:51:50 +0000 (15:51 +0200)
modules.d/99base/selinux-loadpolicy.sh

index c8e69250f6160908bbefa6a8345fb85dbaed17d9..13e013426ecf109eebaa59f0f01fb11b0ce90cf1 100755 (executable)
@@ -1,11 +1,13 @@
 #!/bin/sh
 # FIXME: load selinux policy.  this should really be done after we switchroot 
 if [ -x "$NEWROOT/usr/sbin/load_policy" ] && [ -e "$NEWROOT/etc/sysconfig/selinux" ]; then
-    chroot $NEWROOT /usr/sbin/load_policy -i
+    {
+    chroot $NEWROOT /usr/sbin/load_policy -i 2>&1 
     if [ $? -eq 3 ]; then
-       echo "Initial SELinux policy load failed and enforcing mode requested."
-       echo "Not continuing"
+       warn "Initial SELinux policy load failed and enforcing mode requested."
+       warn "Not continuing"
        sleep 100d
        exit 1
     fi
+    } | vinfo
 fi