diff -Nur --no-dereference e-smith-grub-2.6.1.old/root/etc/e-smith/events/actions/update-grub e-smith-grub-2.6.1/root/etc/e-smith/events/actions/update-grub --- e-smith-grub-2.6.1.old/root/etc/e-smith/events/actions/update-grub 2021-04-16 23:31:02.748000000 -0400 +++ e-smith-grub-2.6.1/root/etc/e-smith/events/actions/update-grub 2021-04-16 23:32:25.385000000 -0400 @@ -1,6 +1,18 @@ #!/usr/bin/perl use strict; use warnings; +use esmith::ConfigDB; + +my $c = esmith::ConfigDB->open_ro or die "Could not open Config DB"; +my $sysconfig = $c->get('sysconfig') or die "Missing db entry sysconfig"; +my $locale = $sysconfig->prop('Language') || "en_US.UTF-8"; +my $orilang=$ENV{LANG}; + +# here we force the environement as it is empty if launched by server-manager +if ( ! defined $ENV{LANG}|| $ENV{LANG}eq "" || $ENV{LANG} eq "C") { + $ENV{LANG}=$locale; +} + my $grubpath; if (-e "/sys/firmware/efi") { @@ -11,3 +23,4 @@ system("/usr/sbin/grub2-mkconfig", "-o", $grubpath) == 0 or die("Unable to update grub2\n"); +$ENV{LANG}=$orilang;