]> git.pld-linux.org Git - packages/grub2.git/blob - grub-mkconfig-diagnostics.patch
- up to 1.98
[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 --- grub-1.97.2/util/grub.d/10_linux.in~        2010-03-10 18:09:58.838434522 +0200
34 +++ grub-1.97.2/util/grub.d/10_linux.in 2010-03-10 18:12:47.478176169 +0200
35 @@ -67,7 +67,7 @@
36  
37  while [ "x$list" != "x" ] ; do
38    linux=`version_find_latest $list`
39 -  echo "Found linux image: $linux" >&2
40 +  echo "Found linux image: $linux" >&3
41    basename=`basename $linux`
42    dirname=`dirname $linux`
43    rel_dirname=`make_system_path_relative_to_its_root $dirname`
44 @@ -85,7 +85,7 @@
45      fi
46    done
47    if test -n "${initrd}" ; then
48 -    echo "Found initrd image: ${dirname}/${initrd}" >&2
49 +    echo "Found initrd image: ${dirname}/${initrd}" >&3
50    else
51      # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
52      linux_root_device_thisversion=${GRUB_DEVICE}
53 --- grub-1.97.2/util/grub.d/30_os-prober.in~    2010-03-10 18:09:58.838434522 +0200
54 +++ grub-1.97.2/util/grub.d/30_os-prober.in     2010-03-10 18:13:43.784870350 +0200
55 @@ -47,7 +47,7 @@
56      LONGNAME="${LABEL}"
57    fi
58  
59 -  echo "Found ${LONGNAME} on ${DEVICE}" >&2
60 +  echo "Found ${LONGNAME} on ${DEVICE}" >&3
61  
62    case ${BOOT} in
63      chain)
64 --- grub-1.97.2/util/grub.d/10_hurd.in~ 2010-03-10 18:15:07.000000000 +0200
65 +++ grub-1.97.2/util/grub.d/10_hurd.in  2010-03-10 18:23:36.364190317 +0200
66 @@ -37,7 +37,7 @@
67      basename=`basename $i`
68      dirname=`dirname $i`
69      rel_dirname=`make_system_path_relative_to_its_root $dirname`
70 -    echo "Found GNU Mach: $i" >&2
71 +    echo "Found GNU Mach: $i" >&3
72      kernel=${rel_dirname}/${basename}
73      at_least_one=true
74    fi
75 @@ -51,7 +51,7 @@
76  
77  for i in /hurd/${hurd_fs}.static /hurd/exec ; do
78    if test -e "$i" ; then
79 -    echo "Found Hurd module: $i" >&2
80 +    echo "Found Hurd module: $i" >&3
81      at_least_one=true
82    else
83      all_of_them=false
84 --- grub-1.97.2/util/grub.d/10_windows.in~      2010-03-10 18:15:07.000000000 +0200
85 +++ grub-1.97.2/util/grub.d/10_windows.in       2010-03-10 18:24:57.464181349 +0200
86 @@ -68,7 +68,7 @@
87    # Get boot /dev/ice.
88    dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
89  
90 -  echo "Found $OS on $dir ($dev)" >&2
91 +  echo "Found $OS on $dir ($dev)" >&3
92    cat << EOF
93  menuentry "$OS" {
94  EOF
This page took 0.033856 seconds and 4 git commands to generate.