diff --git a/tools/appliance/definitions/systemvmtemplate/configure_locale.sh b/tools/appliance/definitions/systemvmtemplate/configure_locale.sh new file mode 100644 index 00000000000..6619c6cf11b --- /dev/null +++ b/tools/appliance/definitions/systemvmtemplate/configure_locale.sh @@ -0,0 +1,13 @@ +fix_locale() { + cat >> /etc/default/locale << EOF +LANG=en_US.UTF-8 +LC_ALL=en_US.UTF-8 +EOF + cat >> /etc/locale.gen << EOF +en_US.UTF-8 UTF-8 +EOF + + locale-gen en_US.UTF-8 +} + +fix_locale diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb index 3513d4678a9..be0b4036ce0 100644 --- a/tools/appliance/definitions/systemvmtemplate/definition.rb +++ b/tools/appliance/definitions/systemvmtemplate/definition.rb @@ -60,6 +60,7 @@ config = { 'build_time.sh', 'apt_upgrade.sh', 'configure_grub.sh', + 'configure_locale.sh', 'configure_login.sh', 'postinstall.sh', 'cleanup.sh', diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh index aaa023e1850..893b5214fb1 100644 --- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh +++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh @@ -140,18 +140,6 @@ fix_hostname() { sed -i '/127.0.1.1/d' /etc/hosts } -fix_locale() { - cat >> /etc/default/locale << EOF -LANG=en_US.UTF-8 -LC_ALL=en_US.UTF-8 -EOF - cat >> /etc/locale.gen << EOF -en_US.UTF-8 UTF-8 -EOF - - locale-gen en_US.UTF-8 -} - # This is actually a bug in the conntrackd package. The comment in the conf file says stats logging is off by default but the parameter is set to on. # After a couple weeks logrotate will rotate the conntrackd-stats.log file ans start conntracking even if we don't want it to (on non-redundant routers for instance). fix_conntrackd() { @@ -178,7 +166,6 @@ do_fixes() { fix_nameserver fix_acpid fix_hostname - fix_locale fix_conntrackd fix_vhdutil fix_modules