/[smeserver]/rpms/e-smith-grub/sme10/e-smith-grub-2.6.1-bz11559-setlocale-in-manager.patch
ViewVC logotype

Annotation of /rpms/e-smith-grub/sme10/e-smith-grub-2.6.1-bz11559-setlocale-in-manager.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Apr 17 03:35:18 2021 UTC (3 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-grub-2_6_1-11_el7_sme, HEAD
* Fri Apr 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.1-11.sme
- set missing locale if update-grub called by server-manager [SME: 11559]

1 jpp 1.1 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
2     --- e-smith-grub-2.6.1.old/root/etc/e-smith/events/actions/update-grub 2021-04-16 23:31:02.748000000 -0400
3     +++ e-smith-grub-2.6.1/root/etc/e-smith/events/actions/update-grub 2021-04-16 23:32:25.385000000 -0400
4     @@ -1,6 +1,18 @@
5     #!/usr/bin/perl
6     use strict;
7     use warnings;
8     +use esmith::ConfigDB;
9     +
10     +my $c = esmith::ConfigDB->open_ro or die "Could not open Config DB";
11     +my $sysconfig = $c->get('sysconfig') or die "Missing db entry sysconfig";
12     +my $locale = $sysconfig->prop('Language') || "en_US.UTF-8";
13     +my $orilang=$ENV{LANG};
14     +
15     +# here we force the environement as it is empty if launched by server-manager
16     +if ( ! defined $ENV{LANG}|| $ENV{LANG}eq "" || $ENV{LANG} eq "C") {
17     + $ENV{LANG}=$locale;
18     +}
19     +
20     my $grubpath;
21    
22     if (-e "/sys/firmware/efi") {
23     @@ -11,3 +23,4 @@
24    
25     system("/usr/sbin/grub2-mkconfig", "-o", $grubpath) == 0
26     or die("Unable to update grub2\n");
27     +$ENV{LANG}=$orilang;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed