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 |
+} |