]> git.pld-linux.org Git - packages/grub2.git/blob - grub-mkconfig-diagnostics.patch
- drop invalid comment
[packages/grub2.git] / grub-mkconfig-diagnostics.patch
1 --- grub-1.97.2/util/grub-mkconfig.in~  2010-03-10 18:09:58.858434588 +0200
2 +++ grub-1.97.2/util/grub-mkconfig.in   2010-03-10 18:11:34.197928250 +0200
3 @@ -243,14 +243,19 @@
4  
5  if test "x${grub_cfg}" != "x"; then
6    rm -f ${grub_cfg}.new
7 +  # open fd &3 for diagnostic messages
8 +  exec 3>&1
9    exec > ${grub_cfg}.new
10  
11    # Allow this to fail, since /boot/grub/ might need to be fatfs to support some
12    # firmware implementations (e.g. OFW or EFI).
13    chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
14    This means that if the generated config contains a password it is readable by everyone"
15 +else
16 +  # open fd &3 for diagnostic messages
17 +  exec 3>&2
18  fi
19 -echo "Generating grub.cfg ..." >&2
20 +echo "Generating grub.cfg ..." >&3
21  
22  cat << EOF
23  #
24 @@ -275,4 +280,7 @@
25    mv -f ${grub_cfg}.new ${grub_cfg}
26  fi
27  
28 -echo "done" >&2
29 +echo "done" >&3
30 +
31 +# close diagnostic stream
32 +exec 3>&-
33 diff -ur grub-1.99~rc2/util/grub.d.org/00_header.in grub-1.99~rc2/util/grub.d/00_header.in
34 --- grub-1.99~rc2/util/grub.d.org/00_header.in  2011-04-06 13:14:27.000000000 +0200
35 +++ grub-1.99~rc2/util/grub.d/00_header.in      2011-09-06 22:29:51.721223357 +0200
36 @@ -113,7 +113,7 @@
37  
38  if [ "x$serial" = x1 ]; then
39      if ! test -e ${GRUB_PREFIX}/serial.mod ; then
40 -       echo "Serial terminal not available on this platform." >&2 ; exit 1
41 +       echo "Serial terminal not available on this platform." >&3 ; exit 1
42      fi
43  
44      if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
45 @@ -174,7 +174,7 @@
46  if [ "x$gfxterm" = x1 ]; then
47      if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
48         && is_path_readable_by_grub "$GRUB_THEME"; then
49 -       echo "Found theme: $GRUB_THEME" >&2
50 +       echo "Found theme: $GRUB_THEME" >&3
51         prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
52         cat << EOF
53  insmod gfxmenu
54 @@ -208,12 +208,12 @@
55  EOF
56      elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
57             && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
58 -       echo "Found background: $GRUB_BACKGROUND" >&2
59 +       echo "Found background: $GRUB_BACKGROUND" >&3
60         case "$GRUB_BACKGROUND" in 
61             *.png)         reader=png ;;
62             *.tga)         reader=tga ;;
63             *.jpg|*.jpeg)  reader=jpeg ;;
64 -           *)             echo "Unsupported image format" >&2; exit 1 ;;
65 +           *)             echo "Unsupported image format" >&3; exit 1 ;;
66         esac
67         prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
68         cat << EOF
69 diff -ur grub-1.99~rc2/util/grub.d.org/10_hurd.in grub-1.99~rc2/util/grub.d/10_hurd.in
70 --- grub-1.99~rc2/util/grub.d.org/10_hurd.in    2011-02-12 07:55:26.000000000 +0100
71 +++ grub-1.99~rc2/util/grub.d/10_hurd.in        2011-09-06 22:29:51.721223357 +0200
72 @@ -41,7 +41,7 @@
73      basename=`basename $i`
74      dirname=`dirname $i`
75      rel_dirname=`make_system_path_relative_to_its_root $dirname`
76 -    echo "Found GNU Mach: $i" >&2
77 +    echo "Found GNU Mach: $i" >&3
78      kernels="${kernels} ${rel_dirname}/${basename}"
79      at_least_one=true
80    fi
81 @@ -55,7 +55,7 @@
82  
83  for i in /hurd/${hurd_fs}.static /hurd/exec ; do
84    if test -e "$i" ; then
85 -    echo "Found Hurd module: $i" >&2
86 +    echo "Found Hurd module: $i" >&3
87      at_least_one=true
88    else
89      all_of_them=false
90 @@ -68,7 +68,7 @@
91  fi
92  
93  if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
94 -  echo "Some Hurd stuff found, but not enough to boot." >&2
95 +  echo "Some Hurd stuff found, but not enough to boot." >&3
96    exit 1
97  fi
98  
99 diff -ur grub-1.99~rc2/util/grub.d.org/10_kfreebsd.in grub-1.99~rc2/util/grub.d/10_kfreebsd.in
100 --- grub-1.99~rc2/util/grub.d.org/10_kfreebsd.in        2011-03-29 02:56:38.000000000 +0200
101 +++ grub-1.99~rc2/util/grub.d/10_kfreebsd.in    2011-09-06 22:29:51.721223357 +0200
102 @@ -130,7 +130,7 @@
103  
104  while [ "x$list" != "x" ] ; do
105    kfreebsd=`version_find_latest $list`
106 -  echo "Found kernel of FreeBSD: $kfreebsd" >&2
107 +  echo "Found kernel of FreeBSD: $kfreebsd" >&3
108    basename=`basename $kfreebsd`
109    dirname=`dirname $kfreebsd`
110    rel_dirname=`make_system_path_relative_to_its_root $dirname`
111 @@ -179,7 +179,7 @@
112      fi
113    done
114    if test -n "${module_dir}" ; then
115 -    echo "Found kernel module directory: ${module_dir}" >&2
116 +    echo "Found kernel module directory: ${module_dir}" >&3
117      module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
118    fi
119  
120 diff -ur grub-1.99~rc2/util/grub.d.org/10_linux.in grub-1.99~rc2/util/grub.d/10_linux.in
121 --- grub-1.99~rc2/util/grub.d.org/10_linux.in   2011-09-06 22:29:38.914236841 +0200
122 +++ grub-1.99~rc2/util/grub.d/10_linux.in       2011-09-06 22:29:51.721223357 +0200
123 @@ -134,7 +134,7 @@
124  
125  while [ "x$list" != "x" ] ; do
126    linux=`version_find_latest $list`
127 -  echo "Found linux image: $linux" >&2
128 +  echo "Found linux image: $linux" >&3
129    basename=`basename $linux`
130    dirname=`dirname $linux`
131    rel_dirname=`make_system_path_relative_to_its_root $dirname`
132 @@ -169,7 +169,7 @@
133    fi
134  
135    if test -n "${initrd}" ; then
136 -    echo "Found initrd image: ${dirname}/${initrd}" >&2
137 +    echo "Found initrd image: ${dirname}/${initrd}" >&3
138    elif test -z "${initramfs}" ; then
139      # "UUID=" magic is parsed by initrd or initramfs.  Since there's
140      # no initrd or builtin initramfs, it can't work here.
141 diff -ur grub-1.99~rc2/util/grub.d.org/10_netbsd.in grub-1.99~rc2/util/grub.d/10_netbsd.in
142 --- grub-1.99~rc2/util/grub.d.org/10_netbsd.in  2011-01-10 17:25:52.000000000 +0100
143 +++ grub-1.99~rc2/util/grub.d/10_netbsd.in      2011-09-06 22:29:51.721223357 +0200
144 @@ -133,7 +133,7 @@
145      continue
146    fi
147  
148 -  echo "Found NetBSD kernel: $k" >&2
149 +  echo "Found NetBSD kernel: $k" >&3
150    netbsd_entry "knetbsd"   "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
151    netbsd_entry "multiboot" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
152    if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
153 diff -ur grub-1.99~rc2/util/grub.d.org/10_windows.in grub-1.99~rc2/util/grub.d/10_windows.in
154 --- grub-1.99~rc2/util/grub.d.org/10_windows.in 2010-12-01 15:45:43.000000000 +0100
155 +++ grub-1.99~rc2/util/grub.d/10_windows.in     2011-09-06 22:29:51.721223357 +0200
156 @@ -76,7 +76,7 @@
157    # Get boot /dev/ice.
158    dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
159  
160 -  echo "Found $OS on $drv ($dev)" >&2
161 +  echo "Found $OS on $drv ($dev)" >&3
162    cat << EOF
163  menuentry "$OS" {
164  EOF
165 diff -ur grub-1.99~rc2/util/grub.d.org/20_linux_xen.in grub-1.99~rc2/util/grub.d/20_linux_xen.in
166 --- grub-1.99~rc2/util/grub.d.org/20_linux_xen.in       2011-04-13 21:20:29.000000000 +0200
167 +++ grub-1.99~rc2/util/grub.d/20_linux_xen.in   2011-09-06 22:29:51.721223357 +0200
168 @@ -134,7 +134,7 @@
169      echo "submenu \"Xen ${xen_version}\" {"
170      while [ "x$list" != "x" ] ; do
171         linux=`version_find_latest $list`
172 -       echo "Found linux image: $linux" >&2
173 +       echo "Found linux image: $linux" >&3
174         basename=`basename $linux`
175         dirname=`dirname $linux`
176         rel_dirname=`make_system_path_relative_to_its_root $dirname`
177 @@ -154,7 +154,7 @@
178             fi
179         done
180         if test -n "${initrd}" ; then
181 -           echo "Found initrd image: ${dirname}/${initrd}" >&2
182 +           echo "Found initrd image: ${dirname}/${initrd}" >&3
183         else
184      # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
185             linux_root_device_thisversion=${GRUB_DEVICE}
186 diff -ur grub-1.99~rc2/util/grub.d.org/30_os-prober.in grub-1.99~rc2/util/grub.d/30_os-prober.in
187 --- grub-1.99~rc2/util/grub.d.org/30_os-prober.in       2010-12-25 18:13:57.000000000 +0100
188 +++ grub-1.99~rc2/util/grub.d/30_os-prober.in   2011-09-06 22:29:51.721223357 +0200
189 @@ -99,7 +99,7 @@
190      LONGNAME="${LABEL}"
191    fi
192  
193 -  echo "Found ${LONGNAME} on ${DEVICE}" >&2
194 +  echo "Found ${LONGNAME} on ${DEVICE}" >&3
195  
196    case ${BOOT} in
197      chain)
198 @@ -198,7 +198,7 @@
199  EOF
200      ;;
201      *)
202 -      echo "  ${LONGNAME} is not yet supported by grub-mkconfig." >&2
203 +      echo "  ${LONGNAME} is not yet supported by grub-mkconfig." >&3
204      ;;
205    esac
206  done
This page took 0.048031 seconds and 3 git commands to generate.