4 case `dpkg --print-architecture` in
6 # No migration from GRUB Legacy, no Linux cmdline
11 .
/usr
/share
/debconf
/confmodule
17 if test -e /boot
/grub
/stage2
&& test -e /boot
/grub
/menu.lst
&& ! test -e /boot
/grub
/core.img
; then
19 db_input high grub-pc
/chainload_from_menu.lst || true
21 db_get grub-pc
/kopt_extracted || true
22 # this check ensures we only do this once
23 if [ "$RET" = "false" ] ; then
24 kopt
=`sed -ne "s/^# kopt=//p" /boot/grub/menu.lst | tr -s " " "\n" | grep -vx "\(ro\|root=[^ ]*\)" | paste -s -d ' '` || true
25 db_set grub
2/linux_cmdline
"${kopt}" || true
26 db_set grub-pc
/kopt_extracted true || true
27 if [ "${kopt}" = "" ] ; then
28 # something smells bad. give user a chance to correct it.
31 # if we got something from menu.lst, it must be correct?
34 timeout
=`sed -ne "s/^timeout[[:space:]][[:space:]]*//p" /boot/grub/menu.lst` || true
35 if [ "${timeout}" != "" ]; then
36 db_set grub-pc
/timeout
"${timeout}" || true
38 if grep -q '^hiddenmenu\([[:space:]]\|$\)' /boot
/grub
/menu.lst
; then
39 db_set grub-pc
/hidden_timeout true || true
41 db_set grub-pc
/hidden_timeout false || true
48 for x
in /etc
/default
/grub
/etc
/default
/grub.d
/*.cfg
; do
54 if [ "${GRUB_CMDLINE_LINUX+set}" = set ]; then
55 db_set grub
2/linux_cmdline
"$GRUB_CMDLINE_LINUX"
57 if [ "${GRUB_CMDLINE_LINUX_DEFAULT+set}" = set ]; then
58 db_set grub
2/linux_cmdline_default
"$GRUB_CMDLINE_LINUX_DEFAULT"
63 if [ "${GRUB_TIMEOUT}" != "" ]; then
64 db_set grub-pc
/timeout
"$GRUB_TIMEOUT"
66 if [ "${GRUB_HIDDEN_TIMEOUT}" != "" ]; then
67 db_set grub-pc
/hidden_timeout true
68 elif egrep -qs '^#?[[:space:]]*GRUB_HIDDEN_TIMEOUT=' /etc
/default
/grub
; then
69 db_set grub-pc
/hidden_timeout false
74 db_input
${priority} grub
2/linux_cmdline || true
75 db_input medium grub
2/linux_cmdline_default || true
76 db_input low grub
2/force_efi_extra_removable || true