[debian-edu-commits] debian-edu/ 01/01: Make grub workaround more robust and log what is being done.

Petter Reinholdtsen pere at moszumanska.debian.org
Fri Oct 24 10:20:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-config.

commit 9895aa9f302b29ee96b81ea5444598fa258c738b
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Fri Oct 24 12:19:36 2014 +0200

    Make grub workaround more robust and log what is being done.
---
 share/debian-edu-config/d-i/pre-pkgsel | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/share/debian-edu-config/d-i/pre-pkgsel b/share/debian-edu-config/d-i/pre-pkgsel
index d1d9255..48799d4 100644
--- a/share/debian-edu-config/d-i/pre-pkgsel
+++ b/share/debian-edu-config/d-i/pre-pkgsel
@@ -304,14 +304,25 @@ create_initial_localadmin_user() {
     fi
 }
 
-# Work around grub bug 712907 (see also bug #763580) by preseeding
+# Work around grub bug #712907 (see also bug #763580) by preseeding
 # grub-installer/choose_device to the disk used by /target/boot
 # This fix it for the most common case.
 workaround_grub_issue() {
+    log "checking if grub workaround for bug #712907 should be activated."
     bootdev=$(grep /target/boot /proc/mounts | cut -d" " -f1)
+    grubdev=$(echo bootdev | sed -rn 's/(\/sd.).*$/\1/p')
+
+    db_get grub-installer/choose_bootdev || true
+    # Only override if it is set to manual, otherwise we assume
+    # someone is preseeding it to the value they want.
+    if [ "manual" != "$RET" ] ; then
+	log "not overriding grub-installer/choose_bootdev to $grubdev"
+	return
+    fi
+
     case "$bootdev" in
 	/dev/sd*)
-	    grubdev=$(echo bootdev | sed -rn 's/(\/sd.).*$/\1/p')
+	    log "overriding grub-installer/choose_bootdev, setting it to $grubdev"
 	    db_set grub-installer/choose_bootdev "$grubdev" || true
 	    ;;
     esac

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list