Add some patches to grub.
[people/pmueller/ipfire-2.x.git] / src / patches / grub-0.97-stderr.patch
1 --- grub-0.97/util/grub-install.in.stderr 2006-07-07 10:56:37.000000000 -0400
2 +++ grub-0.97/util/grub-install.in 2006-07-07 11:01:35.000000000 -0400
3 @@ -207,7 +207,7 @@
4 while test -L $tmp_fname; do
5 tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*-> \(.*\)%\1%p'`
6 if test -z "$tmp_new_fname"; then
7 - echo "Unrecognized ls output" 2>&1
8 + echo "Unrecognized ls output" 1>&2
9 exit 1
10 fi
11
12 @@ -264,7 +264,7 @@
13 stat_device() {
14 majmin=`stat -c "%t:%T" "$1" 2>/dev/null`
15 if test -z "$majmin"; then
16 - echo "Could not find device for $1" 2>&1
17 + echo "Could not find device for $1" 1>&2
18 exit 1
19 fi
20
21 @@ -281,7 +281,7 @@
22 dev=`awk '($2 ~ /'$mntpnt'/) { print $1 }' /etc/mtab`
23 fi
24 if test -z "$dev"; then
25 - echo "Could not find device for $1" 2>&1
26 + echo "Could not find device for $1" 1>&2
27 exit 1
28 fi
29
30 @@ -304,11 +304,11 @@
31 tmp_fname=`df $1/ | sed -n 's%.*\(/dev/[^ ]*\).*%\1%p'`
32
33 if test -z "$tmp_fname"; then
34 - echo "Could not find device for $1" 2>&1
35 + echo "Could not find device for $1" 1>&2
36 exit 1
37 fi
38
39 - ret_fname=`resolve_symlink $tmp_fname`
40 + ret_fname=`resolve_symlink $tmp_fname` || exit 1
41 tmp_fname=`find_mapper_device $ret_fname`
42 if test -n "$tmp_fname"; then
43 ret_fname="$tmp_fname"
44 @@ -325,7 +325,7 @@
45 done
46 for file in \
47 ${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5; do
48 - cp -f $file ${grubdir} || exit 1
49 + cp -f $file ${grubdir} 1>&2 || exit 1
50 done
51 }
52
53 @@ -520,9 +520,9 @@
54 # Check for INSTALL_DEVICE.
55 case "$install_device" in
56 /dev/*)
57 - install_device=`resolve_symlink "$install_device"`
58 + install_device=`resolve_symlink "$install_device"` || exit 1
59 for install_drive in `find_real_devs $install_device` ; do
60 - install_drive=`convert $install_drive`
61 + install_drive=`convert $install_drive` || exit 1
62 if is_raid1_device $install_device; then
63 install_drive=`echo $install_drive | sed 's/,[0-9]*)/)/'`
64 fi
65 @@ -550,8 +550,8 @@
66 unset install_device
67
68 # Get the root drive.
69 -root_device=`find_device ${rootdir}`
70 -bootdir_device=`find_device ${bootdir}`
71 +root_device=`find_device ${rootdir}` || exit 1
72 +bootdir_device=`find_device ${bootdir}` || exit 1
73
74 # Check if the boot directory is in the same device as the root directory.
75 if test "x$root_device" != "x$bootdir_device"; then
76 @@ -561,7 +561,7 @@
77 fi
78
79 # Check if the root directory exists in the same device as the grub directory.
80 -grubdir_device=`find_device ${grubdir}`
81 +grubdir_device=`find_device ${grubdir}` || exit 1
82
83 if test "x$grubdir_device" != "x$root_device"; then
84 # For now, cannot deal with this situation.
85 @@ -582,7 +582,7 @@
86 fi
87
88 # Convert the root deviceto a GRUB drive.
89 -root_drive=`convert "$root_device"`
90 +root_drive=`convert "$root_device"` || exit 1
91 if [ "x$root_drive" = x ]; then
92 exit 1
93 fi
94 @@ -618,7 +618,7 @@
95
96 for install_drive in $install_drives; do
97 # Convert the root deviceto a GRUB drive.
98 - root_drive=`convert "$root_device"`
99 + root_drive=`convert "$root_device"` || exit 1
100 if [ "x$root_drive" = x ]; then
101 exit 1
102 fi