/[smeserver]/rpms/e-smith-grub/sme9/e-smith-grub-2.4.0-remove_motd_txt_from_grub_cfg.patch
ViewVC logotype

Annotation of /rpms/e-smith-grub/sme9/e-smith-grub-2.4.0-remove_motd_txt_from_grub_cfg.patch

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


Revision 1.1 - (hide annotations) (download)
Wed Jan 20 20:44:59 2016 UTC (8 years, 4 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-grub-2_4_0-4_el6_sme, HEAD
* Wed Jan 20 2016 Daniel Berteaud <daniel@firewall-services.com> 2.4.0-4.sme
- Remove motd text from grub.cfg [SME: 9161]

1 vip-ire 1.1 diff -Nur e-smith-grub-2.4.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle e-smith-grub-2.4.0_bz9161/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle
2     --- e-smith-grub-2.4.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle 1970-01-01 01:00:00.000000000 +0100
3     +++ e-smith-grub-2.4.0_bz9161/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle 2016-01-20 21:40:32.612318871 +0100
4     @@ -0,0 +1,31 @@
5     +{
6     + # Remove /etc/motd content which accidentaly was put in grub.cfg
7     + # during kernel upgrades, see BZ 9161
8     + my @bad_lines = (
9     + qr{^Before editing configuration files, familiarise$},
10     + qr{^yourself with the automated events and templates$},
11     + qr{^systems\.$},
12     + qr{^Please take the time to read the documentation$},
13     + qr{^http://wiki.contribs.org/Main_Page$},
14     + qr{^Remember that SME Server is free to download$},
15     + qr{^and use, but it is not free to build$},
16     + qr{^Please help the project :$},
17     + qr{^http://wiki.contribs.org/Donate},
18     + qr{^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \(\d[\.\d\-]*\.el6\.(x86_64|i[3-5]86)\)$}
19     + );
20     + my $title_re = qr{^title \*\*\*\*\*\*\*\*\*\*\*\* Welcome to SME Server 9\.[01] \*\*\*\*\*\*\*\*\*\*\*\*\*$};
21     + my @new_lines = ();
22     + foreach my $l (@lines){
23     + my $match = 0;
24     + foreach (@bad_lines){
25     + if ($l =~ m/$_/){
26     + $match = 1;
27     + last;
28     + }
29     + }
30     + push @new_lines, $l unless ($match);
31     + }
32     + @lines = @new_lines;
33     + @lines = map { s/$title_re/title SME Server $sysconfig{ReleaseVersion}/; $_ } @lines;
34     + $OUT = '';
35     +}

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