1 |
chainsaw 08/01/31 13:26:03 |
2 |
|
3 |
Modified: ChangeLog lilo-22.7.3-r1.ebuild lilo-22.8.ebuild |
4 |
lilo-22.8-r1.ebuild |
5 |
Added: lilo-22.8-r2.ebuild |
6 |
Log: |
7 |
Deal with new coreutils, the new cut insists you start from 1, not 0. Also, be a bit more intelligent about generating labels, do not prefix the backup label with o if the name is unique already. Quote a few variables too. |
8 |
(Portage version: 2.1.4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.51 sys-boot/lilo/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/ChangeLog?rev=1.51&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/ChangeLog?rev=1.51&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/ChangeLog?r1=1.50&r2=1.51 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-boot/lilo/ChangeLog,v |
20 |
retrieving revision 1.50 |
21 |
retrieving revision 1.51 |
22 |
diff -u -r1.50 -r1.51 |
23 |
--- ChangeLog 28 Apr 2007 22:03:26 -0000 1.50 |
24 |
+++ ChangeLog 31 Jan 2008 13:26:02 -0000 1.51 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for sys-boot/lilo |
27 |
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/ChangeLog,v 1.50 2007/04/28 22:03:26 ulm Exp $ |
29 |
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/ChangeLog,v 1.51 2008/01/31 13:26:02 chainsaw Exp $ |
31 |
+ |
32 |
+*lilo-22.8-r2 (31 Jan 2008) |
33 |
+ |
34 |
+ 31 Jan 2008; Tony Vroon <chainsaw@g.o> lilo-22.7.3-r1.ebuild, |
35 |
+ lilo-22.8.ebuild, lilo-22.8-r1.ebuild, +lilo-22.8-r2.ebuild: |
36 |
+ Deal with new coreutils, the new cut insists you start from 1, not 0. Also, |
37 |
+ be a bit more intelligent about generating labels, do not prefix the backup |
38 |
+ label with o if the name is unique already. Quote a few variables too. |
39 |
|
40 |
*lilo-22.8-r1 (28 Apr 2007) |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.7 sys-boot/lilo/lilo-22.7.3-r1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.7.3-r1.ebuild?rev=1.7&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.7.3-r1.ebuild?rev=1.7&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.7.3-r1.ebuild?r1=1.6&r2=1.7 |
50 |
|
51 |
Index: lilo-22.7.3-r1.ebuild |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.7.3-r1.ebuild,v |
54 |
retrieving revision 1.6 |
55 |
retrieving revision 1.7 |
56 |
diff -u -r1.6 -r1.7 |
57 |
--- lilo-22.7.3-r1.ebuild 15 Jul 2007 02:25:03 -0000 1.6 |
58 |
+++ lilo-22.7.3-r1.ebuild 31 Jan 2008 13:26:02 -0000 1.7 |
59 |
@@ -1,6 +1,6 @@ |
60 |
-# Copyright 1999-2007 Gentoo Foundation |
61 |
+# Copyright 1999-2008 Gentoo Foundation |
62 |
# Distributed under the terms of the GNU General Public License v2 |
63 |
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.7.3-r1.ebuild,v 1.6 2007/07/15 02:25:03 mr_bones_ Exp $ |
64 |
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.7.3-r1.ebuild,v 1.7 2008/01/31 13:26:02 chainsaw Exp $ |
65 |
|
66 |
inherit eutils flag-o-matic toolchain-funcs |
67 |
|
68 |
@@ -28,22 +28,22 @@ |
69 |
src_unpack() { |
70 |
unpack ${MY_P}.tar.gz |
71 |
|
72 |
- cd ${S} |
73 |
+ cd "${S}" |
74 |
|
75 |
# Correctly document commandline options -v and -V, bug #43554 |
76 |
- epatch ${FILESDIR}/${P}-correct-usage-info.patch |
77 |
+ epatch "${FILESDIR}/${P}-correct-usage-info.patch" |
78 |
# Install manpages to correct location, do not rely on incorrect manpath output, bug #117135 |
79 |
# Do not strip the main binary, it upsets portage, bug #140210 |
80 |
- epatch ${FILESDIR}/${P}-makefile.patch |
81 |
+ epatch "${FILESDIR}/${P}-makefile.patch" |
82 |
# Do not install diag1.img, bug #149887 |
83 |
- epatch ${FILESDIR}/${P}-makefile-nodiags.patch |
84 |
+ epatch "${FILESDIR}/${P}-makefile-nodiags.patch" |
85 |
# Do not try to read the partition table on LVM2 |
86 |
- epatch ${FILESDIR}/${P}-lvm2-not-partionable.patch |
87 |
+ epatch "${FILESDIR}/${P}-lvm2-not-partionable.patch" |
88 |
|
89 |
# this patch is needed when booting PXE and the device you're using |
90 |
# emulates vga console via serial console. |
91 |
# IE.. B.B.o.o.o.o.t.t.i.i.n.n.g.g....l.l.i.i.n.n.u.u.x.x and stair stepping. |
92 |
- use pxeserial && epatch ${FILESDIR}/${P}-novga.patch |
93 |
+ use pxeserial && epatch "${FILESDIR}/${P}-novga.patch" |
94 |
|
95 |
unpack ${DOLILO_TAR} |
96 |
} |
97 |
@@ -67,22 +67,22 @@ |
98 |
|
99 |
src_install() { |
100 |
keepdir /boot |
101 |
- make ROOT=${D} install || die |
102 |
+ make ROOT="${D}" install || die |
103 |
|
104 |
if use !minimal; then |
105 |
into / |
106 |
- dosbin ${S}/dolilo/dolilo |
107 |
+ dosbin "${S}"/dolilo/dolilo |
108 |
|
109 |
into /usr |
110 |
dosbin keytab-lilo.pl |
111 |
|
112 |
insinto /etc |
113 |
- newins ${FILESDIR}/lilo.conf lilo.conf.example |
114 |
+ newins "${FILESDIR}"/lilo.conf lilo.conf.example |
115 |
|
116 |
- newconfd ${S}/dolilo/dolilo.conf.d dolilo.example |
117 |
+ newconfd "${S}"/dolilo/dolilo.conf.d dolilo.example |
118 |
|
119 |
doman manPages/*.[5-8] |
120 |
- dodoc CHANGES COPYING INCOMPAT README* |
121 |
+ dodoc CHANGES INCOMPAT README* |
122 |
docinto samples ; dodoc sample/* |
123 |
fi |
124 |
} |
125 |
@@ -145,10 +145,10 @@ |
126 |
} |
127 |
|
128 |
pkg_postinst() { |
129 |
- if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] |
130 |
+ if [ ! -e "${ROOT}"/boot/boot.b -a ! -L "${ROOT}"/boot/boot.b ] |
131 |
then |
132 |
[ -f "${ROOT}/boot/boot-menu.b" ] && \ |
133 |
- ln -snf boot-menu.b ${ROOT}/boot/boot.b |
134 |
+ ln -snf boot-menu.b "${ROOT}"/boot/boot.b |
135 |
fi |
136 |
|
137 |
if [ "${ROOT}" = "/" ] && use !minimal; |
138 |
|
139 |
|
140 |
|
141 |
1.5 sys-boot/lilo/lilo-22.8.ebuild |
142 |
|
143 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8.ebuild?rev=1.5&view=markup |
144 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8.ebuild?rev=1.5&content-type=text/plain |
145 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8.ebuild?r1=1.4&r2=1.5 |
146 |
|
147 |
Index: lilo-22.8.ebuild |
148 |
=================================================================== |
149 |
RCS file: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8.ebuild,v |
150 |
retrieving revision 1.4 |
151 |
retrieving revision 1.5 |
152 |
diff -u -r1.4 -r1.5 |
153 |
--- lilo-22.8.ebuild 15 Jul 2007 02:25:03 -0000 1.4 |
154 |
+++ lilo-22.8.ebuild 31 Jan 2008 13:26:02 -0000 1.5 |
155 |
@@ -1,6 +1,6 @@ |
156 |
-# Copyright 1999-2007 Gentoo Foundation |
157 |
+# Copyright 1999-2008 Gentoo Foundation |
158 |
# Distributed under the terms of the GNU General Public License v2 |
159 |
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8.ebuild,v 1.4 2007/07/15 02:25:03 mr_bones_ Exp $ |
160 |
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8.ebuild,v 1.5 2008/01/31 13:26:02 chainsaw Exp $ |
161 |
|
162 |
inherit eutils flag-o-matic toolchain-funcs |
163 |
|
164 |
@@ -28,19 +28,19 @@ |
165 |
src_unpack() { |
166 |
unpack ${MY_P}.tar.gz |
167 |
|
168 |
- cd ${S} |
169 |
+ cd "${S}" |
170 |
|
171 |
# Correctly document commandline options -v and -V, bug #43554 |
172 |
- epatch ${FILESDIR}/${P}-correct-usage-info.patch |
173 |
+ epatch "${FILESDIR}/${P}-correct-usage-info.patch" |
174 |
# Install manpages to correct location, do not rely on incorrect manpath output, bug #117135 |
175 |
# Do not strip the main binary, it upsets portage, bug #140210 |
176 |
# Do not install diag1.img, bug #149887 |
177 |
- epatch ${FILESDIR}/${P}-makefile.patch |
178 |
+ epatch "${FILESDIR}/${P}-makefile.patch" |
179 |
|
180 |
# this patch is needed when booting PXE and the device you're using |
181 |
# emulates vga console via serial console. |
182 |
# IE.. B.B.o.o.o.o.t.t.i.i.n.n.g.g....l.l.i.i.n.n.u.u.x.x and stair stepping. |
183 |
- use pxeserial && epatch ${FILESDIR}/${P}-novga.patch |
184 |
+ use pxeserial && epatch "${FILESDIR}/${P}-novga.patch" |
185 |
|
186 |
unpack ${DOLILO_TAR} |
187 |
} |
188 |
@@ -64,22 +64,22 @@ |
189 |
|
190 |
src_install() { |
191 |
keepdir /boot |
192 |
- make ROOT=${D} install || die |
193 |
+ make ROOT="${D}" install || die |
194 |
|
195 |
if use !minimal; then |
196 |
into / |
197 |
- dosbin ${S}/dolilo/dolilo |
198 |
+ dosbin "${S}"/dolilo/dolilo |
199 |
|
200 |
into /usr |
201 |
dosbin keytab-lilo.pl |
202 |
|
203 |
insinto /etc |
204 |
- newins ${FILESDIR}/lilo.conf lilo.conf.example |
205 |
+ newins "${FILESDIR}"/lilo.conf lilo.conf.example |
206 |
|
207 |
- newconfd ${S}/dolilo/dolilo.conf.d dolilo.example |
208 |
+ newconfd "${S}"/dolilo/dolilo.conf.d dolilo.example |
209 |
|
210 |
doman manPages/*.[5-8] |
211 |
- dodoc CHANGES COPYING INCOMPAT README* |
212 |
+ dodoc CHANGES INCOMPAT README* |
213 |
docinto samples ; dodoc sample/* |
214 |
fi |
215 |
} |
216 |
@@ -142,10 +142,10 @@ |
217 |
} |
218 |
|
219 |
pkg_postinst() { |
220 |
- if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] |
221 |
+ if [ ! -e "${ROOT}"/boot/boot.b -a ! -L "${ROOT}"/boot/boot.b ] |
222 |
then |
223 |
[ -f "${ROOT}/boot/boot-menu.b" ] && \ |
224 |
- ln -snf boot-menu.b ${ROOT}/boot/boot.b |
225 |
+ ln -snf boot-menu.b "${ROOT}"/boot/boot.b |
226 |
fi |
227 |
|
228 |
if [ "${ROOT}" = "/" ] && use !minimal; |
229 |
|
230 |
|
231 |
|
232 |
1.4 sys-boot/lilo/lilo-22.8-r1.ebuild |
233 |
|
234 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8-r1.ebuild?rev=1.4&view=markup |
235 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8-r1.ebuild?rev=1.4&content-type=text/plain |
236 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8-r1.ebuild?r1=1.3&r2=1.4 |
237 |
|
238 |
Index: lilo-22.8-r1.ebuild |
239 |
=================================================================== |
240 |
RCS file: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8-r1.ebuild,v |
241 |
retrieving revision 1.3 |
242 |
retrieving revision 1.4 |
243 |
diff -u -r1.3 -r1.4 |
244 |
--- lilo-22.8-r1.ebuild 15 Jul 2007 02:25:03 -0000 1.3 |
245 |
+++ lilo-22.8-r1.ebuild 31 Jan 2008 13:26:02 -0000 1.4 |
246 |
@@ -1,6 +1,6 @@ |
247 |
-# Copyright 1999-2007 Gentoo Foundation |
248 |
+# Copyright 1999-2008 Gentoo Foundation |
249 |
# Distributed under the terms of the GNU General Public License v2 |
250 |
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8-r1.ebuild,v 1.3 2007/07/15 02:25:03 mr_bones_ Exp $ |
251 |
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8-r1.ebuild,v 1.4 2008/01/31 13:26:02 chainsaw Exp $ |
252 |
|
253 |
inherit eutils flag-o-matic toolchain-funcs |
254 |
|
255 |
@@ -29,20 +29,20 @@ |
256 |
src_unpack() { |
257 |
unpack ${MY_P}.tar.gz |
258 |
|
259 |
- cd ${S} |
260 |
+ cd "${S}" |
261 |
|
262 |
# Correctly document commandline options -v and -V, bug #43554 |
263 |
- epatch ${FILESDIR}/${P}-correct-usage-info.patch |
264 |
+ epatch "${FILESDIR}/${P}-correct-usage-info.patch" |
265 |
# Install manpages to correct location, do not rely on incorrect manpath output, bug #117135 |
266 |
# Do not strip the main binary, it upsets portage, bug #140210 |
267 |
# Do not install diag1.img, bug #149887 |
268 |
- epatch ${FILESDIR}/${P}-makefile.patch |
269 |
+ epatch "${FILESDIR}/${P}-makefile.patch" |
270 |
|
271 |
# this patch is needed when booting PXE and the device you're using |
272 |
# emulates vga console via serial console. |
273 |
# IE.. B.B.o.o.o.o.t.t.i.i.n.n.g.g....l.l.i.i.n.n.u.u.x.x and stair stepping. |
274 |
- use pxeserial && epatch ${FILESDIR}/${P}-novga.patch |
275 |
- use device-mapper || epatch ${FILESDIR}/${P}-nodevmapper.patch |
276 |
+ use pxeserial && epatch "${FILESDIR}/${P}-novga.patch" |
277 |
+ use device-mapper || epatch "${FILESDIR}/${P}-nodevmapper.patch" |
278 |
|
279 |
unpack ${DOLILO_TAR} |
280 |
} |
281 |
@@ -66,22 +66,22 @@ |
282 |
|
283 |
src_install() { |
284 |
keepdir /boot |
285 |
- make ROOT=${D} install || die |
286 |
+ make ROOT="${D}" install || die |
287 |
|
288 |
if use !minimal; then |
289 |
into / |
290 |
- dosbin ${S}/dolilo/dolilo |
291 |
+ dosbin "${S}"/dolilo/dolilo |
292 |
|
293 |
into /usr |
294 |
dosbin keytab-lilo.pl |
295 |
|
296 |
insinto /etc |
297 |
- newins ${FILESDIR}/lilo.conf lilo.conf.example |
298 |
+ newins "${FILESDIR}"/lilo.conf lilo.conf.example |
299 |
|
300 |
- newconfd ${S}/dolilo/dolilo.conf.d dolilo.example |
301 |
+ newconfd "${S}"/dolilo/dolilo.conf.d dolilo.example |
302 |
|
303 |
doman manPages/*.[5-8] |
304 |
- dodoc CHANGES COPYING INCOMPAT README* |
305 |
+ dodoc CHANGES INCOMPAT README* |
306 |
docinto samples ; dodoc sample/* |
307 |
fi |
308 |
} |
309 |
@@ -144,10 +144,10 @@ |
310 |
} |
311 |
|
312 |
pkg_postinst() { |
313 |
- if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] |
314 |
+ if [ ! -e "${ROOT}/boot/boot.b" -a ! -L "${ROOT}/boot/boot.b" ] |
315 |
then |
316 |
[ -f "${ROOT}/boot/boot-menu.b" ] && \ |
317 |
- ln -snf boot-menu.b ${ROOT}/boot/boot.b |
318 |
+ ln -snf boot-menu.b "${ROOT}/boot/boot.b" |
319 |
fi |
320 |
|
321 |
if [ "${ROOT}" = "/" ] && use !minimal; |
322 |
|
323 |
|
324 |
|
325 |
1.1 sys-boot/lilo/lilo-22.8-r2.ebuild |
326 |
|
327 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8-r2.ebuild?rev=1.1&view=markup |
328 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/lilo/lilo-22.8-r2.ebuild?rev=1.1&content-type=text/plain |
329 |
|
330 |
Index: lilo-22.8-r2.ebuild |
331 |
=================================================================== |
332 |
# Copyright 1999-2008 Gentoo Foundation |
333 |
# Distributed under the terms of the GNU General Public License v2 |
334 |
# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.8-r2.ebuild,v 1.1 2008/01/31 13:26:02 chainsaw Exp $ |
335 |
|
336 |
inherit eutils flag-o-matic toolchain-funcs |
337 |
|
338 |
DOLILO_V="0.5" |
339 |
IUSE="static minimal pxeserial device-mapper" |
340 |
|
341 |
DESCRIPTION="Standard Linux boot loader" |
342 |
HOMEPAGE="http://lilo.go.dyndns.org/pub/linux/lilo/" |
343 |
DOLILO_TAR="dolilo-${DOLILO_V}.tar.bz2" |
344 |
MY_P=${P}.src |
345 |
|
346 |
SRC_URI="http://home.san.rr.com/johninsd/pub/linux/lilo/${MY_P}.tar.gz |
347 |
ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${MY_P}.tar.gz |
348 |
ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/obsolete/${MY_P}.tar.gz |
349 |
mirror://gentoo/${DOLILO_TAR}" |
350 |
|
351 |
SLOT="0" |
352 |
LICENSE="BSD GPL-2" |
353 |
KEYWORDS="-* ~x86 ~amd64" |
354 |
|
355 |
DEPEND=">=sys-devel/bin86-0.15.5 |
356 |
device-mapper? ( >=sys-fs/device-mapper-1.02.12 )" |
357 |
|
358 |
PROVIDE="virtual/bootloader" |
359 |
|
360 |
src_unpack() { |
361 |
unpack ${MY_P}.tar.gz |
362 |
|
363 |
cd "${S}" |
364 |
|
365 |
# Correctly document commandline options -v and -V, bug #43554 |
366 |
epatch "${FILESDIR}/${P}-correct-usage-info.patch" |
367 |
# Install manpages to correct location, do not rely on incorrect manpath output, bug #117135 |
368 |
# Do not strip the main binary, it upsets portage, bug #140210 |
369 |
# Do not install diag1.img, bug #149887 |
370 |
epatch "${FILESDIR}/${P}-makefile.patch" |
371 |
|
372 |
# this patch is needed when booting PXE and the device you're using |
373 |
# emulates vga console via serial console. |
374 |
# IE.. B.B.o.o.o.o.t.t.i.i.n.n.g.g....l.l.i.i.n.n.u.u.x.x and stair stepping. |
375 |
use pxeserial && epatch "${FILESDIR}/${P}-novga.patch" |
376 |
use device-mapper || epatch "${FILESDIR}/${P}-nodevmapper.patch" |
377 |
|
378 |
unpack ${DOLILO_TAR} |
379 |
} |
380 |
|
381 |
src_compile() { |
382 |
# lilo needs this. bug 140209 |
383 |
export LC_ALL=C |
384 |
|
385 |
# hardened automatic PIC plus PIE building should be suppressed |
386 |
# because of assembler instructions that cannot be compiled PIC |
387 |
HARDENED_CFLAGS="`test-flags-CC -fno-pic -nopie`" |
388 |
|
389 |
# we explicitly prevent the custom CFLAGS for stability reasons |
390 |
if use static; then |
391 |
emake CC="$(tc-getCC) ${HARDENED_CFLAGS}" lilo.static || die |
392 |
mv lilo.static lilo || die |
393 |
else |
394 |
emake CC="$(tc-getCC) ${HARDENED_CFLAGS}" lilo || die |
395 |
fi |
396 |
} |
397 |
|
398 |
src_install() { |
399 |
keepdir /boot |
400 |
make ROOT="${D}" install || die |
401 |
|
402 |
if use !minimal; then |
403 |
into / |
404 |
dosbin "${S}"/dolilo/dolilo |
405 |
|
406 |
into /usr |
407 |
dosbin keytab-lilo.pl |
408 |
|
409 |
insinto /etc |
410 |
newins "${FILESDIR}"/lilo.conf lilo.conf.example |
411 |
|
412 |
newconfd "${S}"/dolilo/dolilo.conf.d dolilo.example |
413 |
|
414 |
doman manPages/*.[5-8] |
415 |
dodoc CHANGES INCOMPAT README* |
416 |
docinto samples ; dodoc sample/* |
417 |
fi |
418 |
} |
419 |
|
420 |
# Check whether LILO is installed |
421 |
# This function is from /usr/sbin/mkboot from debianutils, with copyright: |
422 |
# |
423 |
# Debian GNU/Linux |
424 |
# Copyright 1996-1997 Guy Maor <maor@××××××.org> |
425 |
# |
426 |
# Modified for Gentoo for use with the lilo ebuild by: |
427 |
# Martin Schlemmer <azarah@g.o> (16 Mar 2003) |
428 |
# |
429 |
lilocheck () { |
430 |
local bootpart= |
431 |
local rootpart="$(mount | grep -v "tmpfs" | grep -v "rootfs" | grep "on / " | cut -f1 -d " ")" |
432 |
|
433 |
echo |
434 |
einfon "Checking for LILO ..." |
435 |
|
436 |
if [ "$(whoami)" != "root" ] |
437 |
then |
438 |
echo; echo |
439 |
eerror "Only root can check for LILO!" |
440 |
return 1 |
441 |
fi |
442 |
|
443 |
if [ -z "${rootpart}" ] |
444 |
then |
445 |
echo; echo |
446 |
eerror "Could not determine root partition!" |
447 |
return 1 |
448 |
fi |
449 |
|
450 |
if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] |
451 |
then |
452 |
echo " No" |
453 |
return 1 |
454 |
fi |
455 |
|
456 |
bootpart="$(sed -n "s:^boot[ ]*=[ ]*\(.*\)[ ]*:\1:p" /etc/lilo.conf)" |
457 |
|
458 |
if [ -z "${bootpart}" ] |
459 |
then |
460 |
# lilo defaults to current root when 'boot=' is not present |
461 |
bootpart="${rootpart}" |
462 |
fi |
463 |
|
464 |
if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' |
465 |
then |
466 |
echo; echo |
467 |
ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" |
468 |
ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." |
469 |
return 1 |
470 |
fi |
471 |
|
472 |
echo " Yes, on ${bootpart}" |
473 |
|
474 |
return 0 |
475 |
} |
476 |
|
477 |
pkg_postinst() { |
478 |
if [ ! -e "${ROOT}/boot/boot.b" -a ! -L "${ROOT}/boot/boot.b" ] |
479 |
then |
480 |
[ -f "${ROOT}/boot/boot-menu.b" ] && \ |
481 |
ln -snf boot-menu.b "${ROOT}/boot/boot.b" |
482 |
fi |
483 |
|
484 |
if [ "${ROOT}" = "/" ] && use !minimal; |
485 |
then |
486 |
if lilocheck |
487 |
then |
488 |
einfo "Running DOLILO to complete the install ..." |
489 |
# do not redirect to /dev/null because it may display some input |
490 |
# prompt |
491 |
/sbin/dolilo |
492 |
if [ "$?" -ne 0 ] |
493 |
then |
494 |
echo |
495 |
ewarn "Running /sbin/dolilo failed! Please check what the problem is" |
496 |
ewarn "before your next reboot." |
497 |
|
498 |
ebeep 5 |
499 |
epause 5 |
500 |
fi |
501 |
fi |
502 |
echo |
503 |
fi |
504 |
if use !minimal; then |
505 |
echo |
506 |
einfo "Issue 'dolilo' instead of 'lilo' to have a friendly wrapper that" |
507 |
einfo "handles mounting and unmounting /boot for you. It can do more then" |
508 |
einfo "that when asked, edit /etc/conf.d/dolilo to harness it's full potential." |
509 |
ebeep 5 |
510 |
epause 3 |
511 |
echo |
512 |
fi |
513 |
} |
514 |
|
515 |
|
516 |
|
517 |
-- |
518 |
gentoo-commits@l.g.o mailing list |