]> git.pld-linux.org Git - packages/burg.git/blob - burg-mkconfig-diagnostics.patch
- fix URL
[packages/burg.git] / burg-mkconfig-diagnostics.patch
1 --- burg-1.98.r1844-bzr/util/grub-mkconfig.in~  2011-04-19 13:24:17.176199143 +0200
2 +++ burg-1.98.r1844-bzr/util/grub-mkconfig.in   2011-04-19 13:30:04.389543848 +0200
3 @@ -287,14 +287,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 burg.cfg ..." >&2
20 +echo "Generating burg.cfg ..." >&3
21  
22  cat << EOF
23  #
24 @@ -319,4 +324,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 --- burg-1.98.r1844-bzr/util/grub.d/10_linux.in~        2011-04-19 13:24:17.166199143 +0200
34 +++ burg-1.98.r1844-bzr/util/grub.d/10_linux.in 2011-04-19 13:31:36.136213508 +0200
35 @@ -111,7 +111,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 @@ -130,7 +130,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 --- burg-1.98.r1844-bzr/util/grub.d/30_os-prober.in~    2011-04-19 13:24:17.166199143 +0200
54 +++ burg-1.98.r1844-bzr/util/grub.d/30_os-prober.in     2011-04-19 13:32:37.132882171 +0200
55 @@ -121,7 +121,7 @@
56      OSLABEL="$s"
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 @@ -220,7 +220,7 @@
65  EOF
66      ;;
67      *)
68 -      echo "  ${LONGNAME} is not yet supported by burg-mkconfig." >&2
69 +      echo "  ${LONGNAME} is not yet supported by burg-mkconfig." >&3
70      ;;
71    esac
72  done
73 --- burg-1.98.r1844-bzr/util/grub.d/10_hurd.in~ 2011-04-19 13:24:17.166199143 +0200
74 +++ burg-1.98.r1844-bzr/util/grub.d/10_hurd.in  2011-04-19 13:33:17.219550150 +0200
75 @@ -40,7 +40,7 @@
76      basename=`basename $i`
77      dirname=`dirname $i`
78      rel_dirname=`make_system_path_relative_to_its_root $dirname`
79 -    echo "Found GNU Mach: $i" >&2
80 +    echo "Found GNU Mach: $i" >&3
81      kernel=${rel_dirname}/${basename}
82      at_least_one=true
83    fi
84 @@ -54,7 +54,7 @@
85  
86  for i in /hurd/${hurd_fs}.static /hurd/exec ; do
87    if test -e "$i" ; then
88 -    echo "Found Hurd module: $i" >&2
89 +    echo "Found Hurd module: $i" >&3
90      at_least_one=true
91    else
92      all_of_them=false
93 --- burg-1.98.r1844-bzr/util/grub.d/10_windows.in~      2011-04-19 13:24:17.166199143 +0200
94 +++ burg-1.98.r1844-bzr/util/grub.d/10_windows.in       2011-04-19 13:33:54.756218045 +0200
95 @@ -68,7 +68,7 @@
96    # Get boot /dev/ice.
97    dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
98  
99 -  echo "Found $OS on $dir ($dev)" >&2
100 +  echo "Found $OS on $dir ($dev)" >&3
101    cat << EOF
102  menuentry "$OS" --class Windows {
103  EOF
104 --- burg-1.98.r1844-bzr/util/grub.d/00_header.in~       2011-04-19 13:24:17.166199143 +0200
105 +++ burg-1.98.r1844-bzr/util/grub.d/00_header.in        2011-04-19 13:35:28.689554452 +0200
106 @@ -42,10 +42,10 @@
107  
108  if test "x${GRUB_USERS}" != "x" ; then
109    if test ! -r $pass_file ; then
110 -    echo "Password file not found" >&2 ; exit 1
111 +    echo "Password file not found" >&3 ; exit 1
112    fi
113  
114 -  awk -F: 'BEGIN {super=""} {print "password_" $3,$1,$4; if ($2=="s") super=super $1 ",";} END {if (super=="") exit 1; else print "set superusers=" super;}' $pass_file || { echo "No superuser is found" >&2 ; exit 1; }
115 +  awk -F: 'BEGIN {super=""} {print "password_" $3,$1,$4; if ($2=="s") super=super $1 ",";} END {if (super=="") exit 1; else print "set superusers=" super;}' $pass_file || { echo "No superuser is found" >&3 ; exit 1; }
116  fi
117  
118  default_theme="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
119 @@ -96,7 +96,7 @@
120  
121  if [ "x$serial" = x1 ]; then
122      if ! test -e ${grub_prefix}/serial.mod ; then
123 -       echo "Serial terminal not available on this platform." >&2 ; exit 1
124 +       echo "Serial terminal not available on this platform." >&3 ; exit 1
125      fi
126  
127      if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
128 @@ -236,7 +236,7 @@
129  EOF
130      if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
131         && is_path_readable_by_grub "$GRUB_THEME"; then
132 -       echo "Found theme: $GRUB_THEME" >&2
133 +       echo "Found theme: $GRUB_THEME" >&3
134         prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` | sed -e "s/^/  /"
135         cat << EOF
136    insmod gfxmenu
137 @@ -270,12 +270,12 @@
138  EOF
139      elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
140             && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
141 -       echo "Found background: $GRUB_BACKGROUND" >&2
142 +       echo "Found background: $GRUB_BACKGROUND" >&3
143         case "$GRUB_BACKGROUND" in
144             *.png)         reader=png ;;
145             *.tga)         reader=tga ;;
146             *.jpg|*.jpeg)  reader=jpeg ;;
147 -           *)             echo "Unsupported image format" >&2; exit 1 ;;
148 +           *)             echo "Unsupported image format" >&3; exit 1 ;;
149         esac
150         prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` | sed -e "s/^/  /"
151         cat << EOF
152 --- burg-1.98.r1844-bzr/util/grub.d/10_kfreebsd.in~     2011-04-19 10:42:18.000000000 +0200
153 +++ burg-1.98.r1844-bzr/util/grub.d/10_kfreebsd.in      2011-04-19 13:36:11.892889198 +0200
154 @@ -82,7 +82,7 @@
155  
156  while [ "x$list" != "x" ] ; do
157    kfreebsd=`version_find_latest $list`
158 -  echo "Found kernel of FreeBSD: $kfreebsd" >&2
159 +  echo "Found kernel of FreeBSD: $kfreebsd" >&3
160    basename=`basename $kfreebsd`
161    dirname=`dirname $kfreebsd`
162    rel_dirname=`make_system_path_relative_to_its_root $dirname`
163 @@ -111,7 +111,7 @@
164      fi
165    done
166    if test -n "${acpi_ko}" ; then
167 -    echo "Found ACPI module: ${acpi_ko}" >&2
168 +    echo "Found ACPI module: ${acpi_ko}" >&3
169      acpi_ko_basename=`basename ${acpi_ko}`
170      acpi_ko_dirname=`dirname ${acpi_ko}`
171      acpi_ko_rel_dirname=`make_system_path_relative_to_its_root $acpi_ko_dirname`
This page took 0.061573 seconds and 3 git commands to generate.