[Ovirt-devel] [PATCH server] add system language check

Joey Boggs jboggs at redhat.com
Mon Apr 13 21:07:12 UTC 2009


This adds a sanity check for the system language. If another system language is used, the method to gather the networking devices could drop all potential devices due to a translated "inet addr" in the output of ifconfig

Feel free to reword the text if need be

Test via system-config-language and set to another language, the bug was discovered while using french.

---
 installer/bin/ovirt-installer |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/installer/bin/ovirt-installer b/installer/bin/ovirt-installer
index 2d88886..f6e5f93 100755
--- a/installer/bin/ovirt-installer
+++ b/installer/bin/ovirt-installer
@@ -124,6 +124,16 @@ if (prompt_yes_no(welcome, :default => "y") == "n")
     exit(0)
 end
 
+lang = `echo $LANG`.chop
+unless lang == "C" || lang =~ /en_US/
+    @cli.say("\nSystem language set to: #{lang}")
+    @cli.say("\nYou will need to set the LANG variable to C for the installer to run")
+    @cli.say("\n export LANG=C")
+    @cli.say("\nTo revert after installation run: export LANG=#{lang} or relogin")
+    exit (1)
+end
+
+
 if File.exist?("/usr/sbin/selinuxenabled")
     sestatus = system "/usr/sbin/selinuxenabled"
     if sestatus == true
-- 
1.6.0.6




More information about the ovirt-devel mailing list