From be1762caff54512bc4a2c64ecf6fb8bac441bc6f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 22 Jun 2011 13:33:37 +0200 Subject: [PATCH] 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. --- modules.d/98selinux/selinux-loadpolicy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.47.3