[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Fix LH_BOOTAPPEND_INSTALL issues for Ubuntu based builds



Hello,

 I've created a patch to fix a regression I introduced for builds using the Ubuntu mode that would result in LH_BOOTAPPEND_INSTALL option being set incorrectly and to set _LH_BOOTAPPEND_PRESEED correctly for Ubuntu USB-HDD builds.

Cheers,

--
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com
diff --git a/functions/defaults.sh b/functions/defaults.sh
index c87811c..32cc7b5 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -767,7 +767,12 @@ Set_defaults ()
 				;;
 
 			usb-hdd)
-				_LH_BOOTAPPEND_PRESEED="file=/hd-media/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+				if [ "${LH_MODE}" = "ubuntu" ]
+				then
+					_LH_BOOTAPPEND_PRESEED="file=/cdrom/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+				else
+					_LH_BOOTAPPEND_PRESEED="file=/hd-media/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+				fi
 				;;
 
 			net)
@@ -786,19 +791,19 @@ Set_defaults ()
 
 	if [ -z "${LH_BOOTAPPEND_INSTALL}" ]
 	then
+		# Ubuntu's d-i is patched to be able to use usb-hdd block devices for
+		# install media if enabled by preseeding cdrom-detect/try-usb to true.
+		if [ "${LH_MODE}" = "ubuntu" ] && [ "${LH_BINARY_IMAGES}" = "usb-hdd" ]
+		then
+			LH_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true"
+		fi
+
 		if [ -n ${_LH_BOOTAPPEND_PRESEED} ]
 		then
-			LH_BOOTAPPEND_INSTALL="${_LH_BOOTAPPEND_PRESEED} -- \${LH_BOOTAPPEND_LIVE}"
-		else
-			LH_BOOTAPPEND_INSTALL=" -- \${LH_BOOTAPPEND_LIVE}"
+			LH_BOOTAPPEND_INSTALL="${LH_BOOTAPPEND_INSTALL} ${_LH_BOOTAPPEND_PRESEED}"
 		fi
-	fi
 
-	# Ubuntu's d-i is patched to be able to use usb-hdd block devices for
-	# install media if enabled by preseeding cdrom-detect/try-usb to true.
-	if [ "${LH_MODE}" = "ubuntu" ] && [ "${LH_BINARY_IMAGES}" = "usb-hdd" ]
-	then
-		LH_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true -- \${LH_BOOTAPPEND_LIVE}"
+		LH_BOOTAPPEND_INSTALL="${LH_BOOTAPPEND_INSTALL} -- \${LH_BOOTAPPEND_LIVE}"
 	fi
 
 	# Setting encryption

Reply to: