1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
diff -urN debianutils-1.16.7.old/installkernel debianutils-1.16.7/installkernel
--- debianutils-1.16.7.old/installkernel 2002-09-28 12:17:03.000000000 -0700
+++ debianutils-1.16.7/installkernel 2003-04-03 16:16:55.000000000 -0800
@@ -33,7 +33,7 @@
cat "$2" > "$dir/$1-$ver"
if [ -f "$dir/$1" ] ; then
- if [ -L "$dir/$1" -a $(ls -l "$dir/$1" | awk '{print $11}') \
+ if [ -L "$dir/$1" -a "$(ls -l "$dir/$1" | awk '{print $11}')" \
= "$1-$ver" ] ; then
ln -sf "$1-$ver.old" "$dir/$1.old"
else
@@ -53,4 +53,4 @@
updatever config "$config"
fi
-mkboot -i
+/usr/sbin/mkboot -i
--- debianutils-1.16.7.old/mkboot 2002-10-16 20:20:42.000000000 -0700
+++ debianutils-1.16.7/mkboot 2003-04-03 16:16:55.000000000 -0800
@@ -14,7 +14,18 @@
# check whether GRUB is installed
grubcheck () {
- [ $(dpkg -s grub | grep -i ^status: | cut -d ' ' -f 4) = "installed" ]
+ # Right way in Gentoo to check, but grub is in system profile,
+ # so rather check for lilo first....
+ if [ -x /usr/bin/portageq ] ; then
+ if portageq has_version / "sys-boot/grub" ; then
+ return 0
+ elif portageq has_version / "sys-boot/grub-static" ; then
+ return 0
+ fi
+ return 1
+ else
+ return 1
+ fi
}
# check whether LILO is installed
@@ -96,7 +102,7 @@
fi
boottype="lilo"
- if [ $(whoami) != root ] ; then
+ if [ "$(whoami)" != root ] ; then
echo "Since you don't have root permissions, I can't put LILO on the diskette."
echo "I will make a non-LILO diskette instead, but it won't be as useful. You"
echo "can hit <Ctrl-C> to cancel."
@@ -146,6 +152,16 @@
echo "either make a bootable floppy diskette, re-run LILO, or have GRUB"
echo "installed."
+ lilocheck
+ if [ $? -eq 0 ] ; then
+ echo -en "\nShould I run /sbin/lilo? (y/n) "
+ read input
+ if [ "$input" = "y" ] ; then
+ /sbin/lilo && exit 0
+ echo "There was a problem running /sbin/lilo."
+ fi
+ fi
+
grubcheck
if [ $? -eq 0 ] ; then
echo -e "\nGRUB is installed. To automatically switch to new kernels, point your"
@@ -153,16 +169,6 @@
exit 0
fi
- lilocheck
- if [ $? -eq 0 ] ; then
- echo -en "\nShould I run /sbin/lilo? (y/n) "
- read input
- if [ "$input" = "y" ] ; then
- /sbin/lilo && exit 0
- echo "There was a problem running /sbin/lilo."
- fi
- fi
-
echo -en "\nShould I make a bootdisk? (y/n) "
read input
if [ "$input" = "y" ] ; then
--- debianutils-1.16.7.old/run-parts.c 2002-10-16 21:19:37.000000000 -0700
+++ debianutils-1.16.7/run-parts.c 2003-04-03 16:17:20.000000000 -0800
@@ -120,7 +120,8 @@
!fnmatch("*~", c, 0) ||
!fnmatch("*.pre_fcopy", c, 0) ||
!fnmatch("*.notslocate", c, 0) ||
- !fnmatch("*.disabled", c, 0) );
+ !fnmatch("*.disabled", c, 0) ||
+ !fnmatch("*.keep", c, 0) );
}
|