From: Harald Hoyer Date: Mon, 31 Aug 2009 14:17:27 +0000 (+0200) Subject: selinux-loadpolicy.sh: redirect output of selinux load_policy X-Git-Tag: 001~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ebc1acb7fc2dac2d31e208da0622f705077113e;p=thirdparty%2Fdracut.git selinux-loadpolicy.sh: redirect output of selinux load_policy --- diff --git a/modules.d/99base/selinux-loadpolicy.sh b/modules.d/99base/selinux-loadpolicy.sh index c8e69250f..13e013426 100755 --- a/modules.d/99base/selinux-loadpolicy.sh +++ b/modules.d/99base/selinux-loadpolicy.sh @@ -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