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 --- e-smith-grub-2.4.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle 1970-01-01 01:00:00.000000000 +0100 +++ 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 @@ -0,0 +1,31 @@ +{ + # Remove /etc/motd content which accidentaly was put in grub.cfg + # during kernel upgrades, see BZ 9161 + my @bad_lines = ( + qr{^Before editing configuration files, familiarise$}, + qr{^yourself with the automated events and templates$}, + qr{^systems\.$}, + qr{^Please take the time to read the documentation$}, + qr{^http://wiki.contribs.org/Main_Page$}, + qr{^Remember that SME Server is free to download$}, + qr{^and use, but it is not free to build$}, + qr{^Please help the project :$}, + qr{^http://wiki.contribs.org/Donate}, + qr{^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \(\d[\.\d\-]*\.el6\.(x86_64|i[3-5]86)\)$} + ); + my $title_re = qr{^title \*\*\*\*\*\*\*\*\*\*\*\* Welcome to SME Server 9\.[01] \*\*\*\*\*\*\*\*\*\*\*\*\*$}; + my @new_lines = (); + foreach my $l (@lines){ + my $match = 0; + foreach (@bad_lines){ + if ($l =~ m/$_/){ + $match = 1; + last; + } + } + push @new_lines, $l unless ($match); + } + @lines = @new_lines; + @lines = map { s/$title_re/title SME Server $sysconfig{ReleaseVersion}/; $_ } @lines; + $OUT = ''; +}