summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_preseed
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lh_chroot_preseed')
-rwxr-xr-xhelpers/lh_chroot_preseed46
1 files changed, 21 insertions, 25 deletions
diff --git a/helpers/lh_chroot_preseed b/helpers/lh_chroot_preseed
index 02418c780..6e9cf9136 100755
--- a/helpers/lh_chroot_preseed
+++ b/helpers/lh_chroot_preseed
@@ -1,6 +1,6 @@
#!/bin/sh
-# lh_chroot_preseed(1) - mount /proc
+# lh_chroot_preseed(1) - use debconf preseeding file
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -32,11 +32,6 @@ Read_conffile config/binary
Read_conffile config/source
Set_defaults
-if [ -z "${LIVE_PRESEED}" ]
-then
- exit 0
-fi
-
Echo_message "Begin executing preseed..."
# Requiring stage file
@@ -51,28 +46,29 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if [ -f "${LIVE_PRESEED}" ]
-then
- # Check dependency
- Check_package chroot/usr/bin/debconf-set-selections debconf
+# Processing preseeds
+for PRESEED in ${LIVE_PACKAGES_LISTS} ${LIVE_TASKS}
+do
+ if [ -f ${LH_BASE:-/usr/share/live-helper}/preseed/"${PRESEED}" ]
+ then
+ # Check dependency
+ Check_package chroot/usr/bin/debconf-set-selections debconf
- # Install dependency
- Install_package
+ # Install dependency
+ Install_package
- # Copying preseed
- cp "${LIVE_PRESEED}" chroot/root/preseed
+ # Copying preseed
+ cp "${PRESEED}" chroot/root/preseed
- Chroot "debconf-set-selections /root/preseed"
+ Chroot "debconf-set-selections /root/preseed"
- # Removing preseed file
- rm -f chroot/root/preseed
+ # Removing preseed file
+ rm -f chroot/root/preseed
- # Remove dependency
- Remove_package
+ # Remove dependency
+ Remove_package
- # Creating stage file
- Create_stagefile .stage/chroot_preseed
-else
- Echo_error "'${LIVE_PRESEED}' file doesn't exists."
- exit 1
-fi
+ # Creating stage file
+ Create_stagefile .stage/chroot_preseed
+ fi
+done