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

[PATCH 1/2] Fix preseeding support



From: Otavio Salvador <otavio@ossystems.com.br>

Preseeding wasn't calling apt-get with --force-yes hence aborting
chroot building. Besides, we add support to identify a wrong or non
existent preseeding file warning the user when it's the case.
---

 src/scripts/14chroot.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh
index 5b226e1..45d214d 100644
--- a/src/scripts/14chroot.sh
+++ b/src/scripts/14chroot.sh
@@ -95,10 +95,15 @@ Chroot ()
 		# Restore preseed configuration
 		if [ -f "${LIVE_PRESEED}" ]
 		then
-			Chroot_exec "apt-get install --yes debconf-utils"
+			Chroot_exec "apt-get install --yes --force-yes debconf-utils"
 			cp "${LIVE_PRESEED}" "${LIVE_CHROOT}"/root/preseed
 			Chroot_exec "debconf-set-selections /root/preseed"
 			rm -f "${LIVE_CHROOT}"/root/preseed
+		else
+			if [ -n "${LIVE_PRESEED}" ]; then
+				echo "'${LIVE_PRESEED}' file doesn't exists. Exiting..."
+				exit 1
+			fi
 		fi
 
 		# Restore cloned package selection


Reply to: