/[smeserver]/rpms/e-smith-grub/sme10/e-smith-grub-2.6.0.grub2adaptation.patch
ViewVC logotype

Contents of /rpms/e-smith-grub/sme10/e-smith-grub-2.6.0.grub2adaptation.patch

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


Revision 1.2 - (show annotations) (download)
Wed Jun 15 21:00:56 2016 UTC (8 years, 4 months ago) by stephdl
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
removing e-smith-grub-2.6.0.grub2adaptation.patch smeserver.xpm.gz

1 diff -Nur e-smith-grub-2.6.0.old/createlinks e-smith-grub-2.6.0/createlinks
2 --- e-smith-grub-2.6.0.old/createlinks 2008-10-07 19:35:43.000000000 +0200
3 +++ e-smith-grub-2.6.0/createlinks 2016-06-13 10:29:32.389234506 +0200
4 @@ -2,9 +2,24 @@
5
6 use esmith::Build::CreateLinks qw(:all);
7
8 -templates2events("/boot/grub/grub.conf",
9 - qw(
10 - local
11 - post-install
12 - post-upgrade
13 - ));
14 +
15 +# templates to expand
16 + for my $event (qw(
17 + local
18 + post-install
19 + post-upgrade
20 + ))
21 + {
22 + event_templates ($event , "/etc/sysconfig/kernel");
23 + event_templates ($event , "/etc/default/grub");
24 + }
25 +
26 +# actions to perform
27 + for my $event (qw(
28 + local
29 + post-install
30 + post-upgrade
31 + ))
32 + {
33 + event_actions ( $event , 'update-grub'=>'10');
34 + }
35 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/events/actions/update-grub e-smith-grub-2.6.0/root/etc/e-smith/events/actions/update-grub
36 --- e-smith-grub-2.6.0.old/root/etc/e-smith/events/actions/update-grub 1970-01-01 01:00:00.000000000 +0100
37 +++ e-smith-grub-2.6.0/root/etc/e-smith/events/actions/update-grub 2016-06-13 10:29:32.389234506 +0200
38 @@ -0,0 +1,5 @@
39 +#!/usr/bin/perl
40 +use strict;
41 +use warnings;
42 + system("grub2-mkconfig","-o","/boot/grub2/grub.cfg") == 0
43 + or die("Unable to update grub2\n");
44 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/FixRoot e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixRoot
45 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/FixRoot 2006-03-16 07:34:15.000000000 +0100
46 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixRoot 1970-01-01 01:00:00.000000000 +0100
47 @@ -1,5 +0,0 @@
48 -{
49 - @lines = map { s/root \(hd1,0\)/root (hd0,0)/ ; $_ } @lines;
50 - $OUT = "";
51 -}
52 -
53 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle
54 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle 2016-02-05 23:58:49.000000000 +0100
55 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/FixTitle 1970-01-01 01:00:00.000000000 +0100
56 @@ -1,31 +0,0 @@
57 -{
58 - # Remove /etc/motd content which accidentaly was put in grub.cfg
59 - # during kernel upgrades, see BZ 9161
60 - my @bad_lines = (
61 - qr{^Before editing configuration files, familiarise$},
62 - qr{^yourself with the automated events and templates$},
63 - qr{^systems\.$},
64 - qr{^Please take the time to read the documentation$},
65 - qr{^http://wiki.contribs.org/Main_Page$},
66 - qr{^Remember that SME Server is free to download$},
67 - qr{^and use, but it is not free to build$},
68 - qr{^Please help the project :$},
69 - qr{^http://wiki.contribs.org/Donate},
70 - qr{^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \(\d[\.\d\-]*\.el6\.(x86_64|i[3-5]86)\)$}
71 - );
72 - my $title_re = qr{^title \*\*\*\*\*\*\*\*\*\*\*\* Welcome to SME Server 9\.[01] \*\*\*\*\*\*\*\*\*\*\*\*\*$};
73 - my @new_lines = ();
74 - foreach my $l (@lines){
75 - my $match = 0;
76 - foreach (@bad_lines){
77 - if ($l =~ m/$_/){
78 - $match = 1;
79 - last;
80 - }
81 - }
82 - push @new_lines, $l unless ($match);
83 - }
84 - @lines = @new_lines;
85 - @lines = map { s/$title_re/title SME Server $sysconfig{ReleaseVersion}/; $_ } @lines;
86 - $OUT = '';
87 -}
88 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/hiddenmenu e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/hiddenmenu
89 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/hiddenmenu 2013-01-31 22:31:36.000000000 +0100
90 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/hiddenmenu 1970-01-01 01:00:00.000000000 +0100
91 @@ -1,5 +0,0 @@
92 -{
93 - @lines = map { s/^hiddenmenu$// ; $_ } @lines;
94 - $OUT = "";
95 -}
96 -
97 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/RemovePlymouth e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/RemovePlymouth
98 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/RemovePlymouth 2016-02-05 23:58:49.000000000 +0100
99 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/RemovePlymouth 1970-01-01 01:00:00.000000000 +0100
100 @@ -1,4 +0,0 @@
101 -{
102 - @lines = map { s/ro root/ro rd_NO_PLYMOUTH root/; $_ } @lines;
103 - $OUT = "";
104 -}
105 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/template-begin e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/template-begin
106 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/template-begin 2006-03-16 07:34:15.000000000 +0100
107 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/template-begin 1970-01-01 01:00:00.000000000 +0100
108 @@ -1,8 +0,0 @@
109 -{
110 - if (open(GRUB, "/boot/grub/grub.conf"))
111 - {
112 - @lines = <GRUB>;
113 - }
114 - close GRUB;
115 - $OUT = "";
116 -}
117 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/template-end e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/template-end
118 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/template-end 2006-03-16 07:34:15.000000000 +0100
119 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/template-end 1970-01-01 01:00:00.000000000 +0100
120 @@ -1,6 +0,0 @@
121 -{
122 - foreach (@lines)
123 - {
124 - $OUT .= "$_\n";
125 - }
126 -}
127 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateCentOS e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateCentOS
128 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateCentOS 2008-10-07 19:35:43.000000000 +0200
129 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateCentOS 1970-01-01 01:00:00.000000000 +0100
130 @@ -1,4 +0,0 @@
131 -{
132 - @lines = map { s/^title CentOS/title SME Server/; $_ } @lines;
133 - $OUT = "";
134 -}
135 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateDefault e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateDefault
136 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateDefault 2006-03-16 07:34:15.000000000 +0100
137 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateDefault 1970-01-01 01:00:00.000000000 +0100
138 @@ -1,28 +0,0 @@
139 -{
140 - return "" unless (defined $EVENT and $EVENT eq "local");
141 -
142 - open (VERSION, "/proc/version") or die "Couldn't read /proc/version";
143 - my $version = <VERSION>;
144 - chomp $version;
145 - $version =~ s/^Linux version ([^\s]+) .*/$1/;
146 - close VERSION;
147 -
148 - $default_index = 0;
149 - foreach (@lines)
150 - {
151 - $default_index=$1 if /^default=(\d+)/;
152 - }
153 -
154 - my $i = 0;
155 - foreach $kernel (grep { /^[^#]*kernel\s+.*vmlinuz/ } @lines)
156 - {
157 - if ($kernel =~ /vmlinuz-$version\s/)
158 - {
159 - $default_index=$i;
160 - last;
161 - }
162 - $i++;
163 - }
164 - @lines = map { s/default=\d+/default=$default_index/; $_ } @lines;
165 - $OUT = "";
166 -}
167 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateSplash e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateSplash
168 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateSplash 2008-10-07 19:35:43.000000000 +0200
169 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/boot/grub/grub.conf/UpdateSplash 1970-01-01 01:00:00.000000000 +0100
170 @@ -1,15 +0,0 @@
171 -{
172 - our @newlines;
173 - foreach( @lines ) {
174 - next if /^foreground/ || /^background/;
175 - if ( m#^splashimage=(.*)/# ) {
176 - push @newlines, "splashimage=$1/smeserver.xpm.gz";
177 - push @newlines, "foreground 000000";
178 - push @newlines, "background 4E95D3";
179 - } else {
180 - push @newlines, $_;
181 - }
182 - }
183 - @lines = @newlines;
184 - $OUT = "";
185 -}
186 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/DisableConsole e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/DisableConsole
187 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/DisableConsole 1970-01-01 01:00:00.000000000 +0100
188 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/DisableConsole 2016-06-13 10:32:34.839167425 +0200
189 @@ -0,0 +1,4 @@
190 +{
191 + @lines = map { s/GRUB_TERMINAL_OUTPUT="console"/GRUB_TERMINAL_OUTPUT="gfxterm"/; $_ } @lines;
192 + $OUT = "";
193 +}
194 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/EnableRecovery e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/EnableRecovery
195 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/EnableRecovery 1970-01-01 01:00:00.000000000 +0100
196 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/EnableRecovery 2016-06-13 10:29:32.390234506 +0200
197 @@ -0,0 +1,4 @@
198 +{
199 + @lines = map { s/GRUB_DISABLE_RECOVERY="true"/GRUB_DISABLE_RECOVERY="false"/; $_ } @lines;
200 + $OUT = "";
201 +}
202 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/GrubSplash e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/GrubSplash
203 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/GrubSplash 1970-01-01 01:00:00.000000000 +0100
204 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/GrubSplash 2016-06-13 10:33:26.757148361 +0200
205 @@ -0,0 +1,5 @@
206 +{
207 + push @lines, 'GRUB_BACKGROUND="/boot/grub/smeserver10.png"' unless ( grep /GRUB_BACKGROUND/, @lines );
208 + push @lines, 'GRUB_GFXMODE="640x480"' unless ( grep /GRUB_GFXMODE/, @lines );
209 + $OUT = "";
210 +}
211 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/template-begin e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/template-begin
212 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/template-begin 1970-01-01 01:00:00.000000000 +0100
213 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/template-begin 2016-06-13 10:29:32.391234505 +0200
214 @@ -0,0 +1,8 @@
215 +{
216 + if (open(GRUB, "/etc/default/grub"))
217 + {
218 + @lines = <GRUB>;
219 + }
220 + close GRUB;
221 + $OUT = "";
222 +}
223 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/template-end e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/template-end
224 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates/etc/default/grub/template-end 1970-01-01 01:00:00.000000000 +0100
225 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates/etc/default/grub/template-end 2016-06-13 10:29:32.391234505 +0200
226 @@ -0,0 +1,6 @@
227 +{
228 + foreach (@lines)
229 + {
230 + $OUT .= "$_\n";
231 + }
232 +}
233 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates.metadata/boot/grub/grub.conf e-smith-grub-2.6.0/root/etc/e-smith/templates.metadata/boot/grub/grub.conf
234 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates.metadata/boot/grub/grub.conf 2006-03-16 07:34:15.000000000 +0100
235 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates.metadata/boot/grub/grub.conf 1970-01-01 01:00:00.000000000 +0100
236 @@ -1 +0,0 @@
237 -FILTER=sub { $_[0] =~ /^\s*$/ ? '' : $_[0] }
238 diff -Nur e-smith-grub-2.6.0.old/root/etc/e-smith/templates.metadata/etc/default/grub e-smith-grub-2.6.0/root/etc/e-smith/templates.metadata/etc/default/grub
239 --- e-smith-grub-2.6.0.old/root/etc/e-smith/templates.metadata/etc/default/grub 1970-01-01 01:00:00.000000000 +0100
240 +++ e-smith-grub-2.6.0/root/etc/e-smith/templates.metadata/etc/default/grub 2016-06-13 10:29:32.391234505 +0200
241 @@ -0,0 +1 @@
242 +FILTER=sub { $_[0] =~ /^\s*$/ ? '' : $_[0] }

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