CLOUDSTACK-7143: split locale config into its own file
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aa14a619 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aa14a619 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aa14a619 Branch: refs/heads/master Commit: aa14a619a640e21c6f3be18c6a0500e6b7082b4f Parents: 3f8c31b Author: Leo Simons <lsim...@schubergphilis.com> Authored: Mon Jul 21 11:15:23 2014 +0200 Committer: Rohit Yadav <rohit.ya...@shapeblue.com> Committed: Mon Sep 22 21:31:35 2014 +0200 ---------------------------------------------------------------------- .../definitions/systemvmtemplate/configure_locale.sh | 13 +++++++++++++ .../definitions/systemvmtemplate/definition.rb | 1 + .../definitions/systemvmtemplate/postinstall.sh | 13 ------------- 3 files changed, 14 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa14a619/tools/appliance/definitions/systemvmtemplate/configure_locale.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/configure_locale.sh b/tools/appliance/definitions/systemvmtemplate/configure_locale.sh new file mode 100644 index 0000000..6619c6c --- /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 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa14a619/tools/appliance/definitions/systemvmtemplate/definition.rb ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb index 3513d46..be0b403 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', http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa14a619/tools/appliance/definitions/systemvmtemplate/postinstall.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh index aaa023e..893b521 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