From: Harald Hoyer Date: Wed, 22 Jun 2011 11:33:37 +0000 (+0200) Subject: selinux/selinux-loadpolicy.sh: set LANG=C for load_policy and restorecon X-Git-Tag: 011~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be1762caff54512bc4a2c64ecf6fb8bac441bc6f;p=thirdparty%2Fdracut.git selinux/selinux-loadpolicy.sh: set LANG=C for load_policy and restorecon set LANG=C for chroot execed tools, because the terminal might not be able to display the messages and the rest is not translated anyway. --- diff --git a/modules.d/98selinux/selinux-loadpolicy.sh b/modules.d/98selinux/selinux-loadpolicy.sh index 4d28518d1..9d4cac5cf 100755 --- a/modules.d/98selinux/selinux-loadpolicy.sh +++ b/modules.d/98selinux/selinux-loadpolicy.sh @@ -27,11 +27,11 @@ rd_load_policy() # load_policy does mount /proc and /selinux in # libselinux,selinux_init_load_policy() if [ -x "$NEWROOT/sbin/load_policy" ]; then - out=$(chroot "$NEWROOT" /sbin/load_policy -i 2>&1) + out=$(LANG=C chroot "$NEWROOT" /sbin/load_policy -i 2>&1) ret=$? info $out else - out=$(chroot "$NEWROOT" /usr/sbin/load_policy -i 2>&1) + out=$(LANG=C chroot "$NEWROOT" /usr/sbin/load_policy -i 2>&1) ret=$? info $out fi @@ -44,7 +44,7 @@ rd_load_policy() # If machine requires a relabel, force to permissive mode [ -e "$NEWROOT"/.autorelabel ] && ( echo 0 > "$NEWROOT"/selinux/enforce ) mount --bind /dev "$NEWROOT/dev" - chroot "$NEWROOT" /sbin/restorecon -R /dev + LANG=C chroot "$NEWROOT" /sbin/restorecon -R /dev return 0 fi