source: grub-pc/trunk/fuentes/debian/config.in @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 2.3 KB
Line 
1#!/bin/sh
2set -e
3
4case `dpkg --print-architecture` in
5  kfreebsd-*)
6    # No migration from GRUB Legacy, no Linux cmdline
7    exit 0
8  ;;
9esac
10
11. /usr/share/debconf/confmodule
12
13priority=medium
14
15case @PACKAGE@ in
16  grub-pc)
17    if test -e /boot/grub/stage2 && test -e /boot/grub/menu.lst && ! test -e /boot/grub/core.img ; then
18
19      db_input high grub-pc/chainload_from_menu.lst || true
20
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 grub2/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.
29          priority=high
30        else
31          # if we got something from menu.lst, it must be correct?
32          priority=medium
33        fi
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
37        fi
38        if grep -q '^hiddenmenu\([[:space:]]\|$\)' /boot/grub/menu.lst; then
39          db_set grub-pc/hidden_timeout true || true
40        else
41          db_set grub-pc/hidden_timeout false || true
42        fi
43      fi
44    fi
45  ;;
46esac
47
48for x in /etc/default/grub /etc/default/grub.d/*.cfg ; do
49  if [ -e "$x" ]; then
50    . "$x"
51  fi
52done
53
54if [ "${GRUB_CMDLINE_LINUX+set}" = set ]; then
55  db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"
56fi
57if [ "${GRUB_CMDLINE_LINUX_DEFAULT+set}" = set ]; then
58  db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
59fi
60
61case @PACKAGE@ in
62  grub-pc)
63    if [ "${GRUB_TIMEOUT}" != "" ]; then
64      db_set grub-pc/timeout "$GRUB_TIMEOUT"
65    fi
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
70    fi
71  ;;
72esac
73
74db_input ${priority} grub2/linux_cmdline || true
75db_input medium grub2/linux_cmdline_default || true
76case @PACKAGE@ in
77  grub-*efi*)
78    db_input low grub2/force_efi_extra_removable || true
79  ;;
80esac
81db_go
Note: See TracBrowser for help on using the repository browser.