diff options
author | Daniel Baumann <daniel@debian.org> | 2008-08-12 22:04:25 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:39 +0100 |
commit | 384a050c792ed13b3c1b0427ce55b7c3b3463170 (patch) | |
tree | 12ebf6686b8d8a4f40d2406e9f444d7f07a807dd /functions | |
parent | eae542dababfa372746e64c729ad6e49c9afbc88 (diff) | |
download | vyos-live-build-384a050c792ed13b3c1b0427ce55b7c3b3463170.tar.gz vyos-live-build-384a050c792ed13b3c1b0427ce55b7c3b3463170.zip |
Adding guessing of the preseeding filename, and way to manually overwrite it (or select it in case of multiple available preseeding files).
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/defaults.sh | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index afd5ef171..7db4e4d0c 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -504,13 +504,6 @@ Set_defaults () # Setting apt indices LH_BINARY_INDICES="${LH_BINARY_INDICES:-enabled}" - # Setting boot parameters - # LH_BOOTAPPEND_LIVE - if [ -z "${LH_BOOTAPPEND_INSTALL}" ] - then - LH_BOOTAPPEND_INSTALL="-- \${LH_BOOTAPPEND_LIVE}" - fi - # Setting bootloader if [ -z "${LH_BOOTLOADER}" ] then @@ -541,6 +534,45 @@ Set_defaults () # Setting debian-installer distribution LH_DEBIAN_INSTALLER_DISTRIBUTION="${LH_DEBIAN_INSTALLER_DISTRIBUTION:-${LH_DISTRIBUTION}}" + # Setting debian-installer preseed filename + if [ -z "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ] + then + if Find_files config/binary_debian-installer/preseed.cfg + then + LH_DEBIAN_INSTALLER_PRESEEDFILE="/install/preseed.cfg" + fi + + if Find_files config/binary_debian-installer/*.cfg && [ ! -e config/binary_debian-installer/preseed.cfg ] + then + Echo_warning "You have placed some preseeding files into config/binary_debian-installer" + Echo_warning "but you didn't specify the default preseeding file through" + Echo_warning "LH_DEBIAN_INSTALLER_PRESEEDFILE. This means that debian-installer will not" + Echo_warning "take up a preseeding file by default." + fi + fi + + # Setting boot parameters + # LH_BOOTAPPEND_LIVE + if [ -n "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ] + then + case "${LH_BINARY_IMAGES}" in + iso) + LH_BOOTAPPEND_PRESEED="file=/cdrom${LH_DEBIAN_INSTALLER_PRESEEDFILE}" + ;; + + usb-hdd) + LH_BOOTAPPEND_PRESEED="file=/hd-media${LH_DEBIAN_INSTALLER_PRESEEDFILE}" + ;; + esac + fi + + if [ -z "${LH_BOOTAPPEND_INSTALL}" ] && [ -n ${LH_BOOTAPPEND_PRESEED} ] + then + LH_BOOTAPPEND_INSTALL="${LH_BOOTAPPEND_PRESEED} -- \${LH_BOOTAPPEND_LIVE}" + else + LH_BOOTAPPEND_INSTALL="-- \${LH_BOOTAPPEND_LIVE}" + fi + # Setting encryption LH_ENCRYPTION="${LH_ENCRYPTION:-disabled}" |