[28204] in Source-Commits

home help back first fref pref prev next nref lref last post

scripts commit: Clean up kernel arguments passed to stage2

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue May 13 14:43:35 2014

Date: Tue, 13 May 2014 14:43:27 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201405131843.s4DIhRdf013219@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/scripts/commit/db98adec61dbd24b629cbacb03961d11fc663f93
commit db98adec61dbd24b629cbacb03961d11fc663f93
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Tue May 13 13:22:27 2014 -0400

    Clean up kernel arguments passed to stage2
    
    Remove support for installing distros older than Precise via PXE,
    and standardize the kernel arguments.  For anything we don't know
    about, ask the user rather than guessing wrong.  This still allows
    the installation of ancient distros.

 installer/pxe/stage1/debathena/installer.sh |   34 +++++++++++++++++++--------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/installer/pxe/stage1/debathena/installer.sh b/installer/pxe/stage1/debathena/installer.sh
index b39023f..8d763e8 100644
--- a/installer/pxe/stage1/debathena/installer.sh
+++ b/installer/pxe/stage1/debathena/installer.sh
@@ -365,20 +365,34 @@ if [ "$test" != "test" ]; then
 fi
 dkargs="DEBCONF_DEBUG=5"
 
-nodhcp="netcfg/disable_dhcp=true"
+nodhcp="netcfg/disable_autoconfig=true"
+kbdcode="keyboard-configuration/layoutcode=us"
 distrobase=$(echo "$distro" | sed -e 's/-.*//')
 case "$distrobase" in
-    oneiric|precise|quantal|raring)
-        kbdcode="keyboard-configuration/layoutcode=us"
-        # "Yay"
-        nodhcp="netcfg/disable_autoconfig=true"
+    precise|trusty)
 	;;
-    natty)
-        # Sigh
-        kbdcode="keyboard-configuration/layoutcode=us"
-        ;;
     *)
-        kbdcode="console-setup/layoutcode=us"
+	echo "I don't know how to preconfigure '$distrobase'"
+	while true; do
+	    echo "Enter the d-i configuration to select a keyboard layout"
+	    echo -n "or leave blank to prompt later: "
+	    read kbdcode
+	    echo "Enter the d-i configuration to disable dhcp"
+	    echo -n "(leaving it blank probably won't work): "
+	    read nodhcp
+	    echo
+	    echo "Will pass these kernel arguments:"
+	    echo "$kbdcode $nodhcp"
+	    echo -n "ok? [Y/n]"
+	    read answer
+	    case $answer in
+		[nN]*)
+		    ;;
+		*)
+		    break
+		    ;;
+	    esac
+	done
         ;;
 esac
 

home help back first fref pref prev next nref lref last post