3
# lh_chroot_preseed(1) - use debconf preseeding file
4
# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
6
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7
# This is free software, and you are welcome to redistribute it
8
# under certain conditions; see COPYING for details.
12
# Including common functions
13
. "${LH_BASE:-/usr/share/live-helper}"/functions.sh
15
# Setting static variables
16
DESCRIPTION="$(Echo 'execute preseed in chroot')"
18
USAGE="${PROGRAM} [--force]"
22
# Reading configuration files
23
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
26
Echo_message "Begin executing preseed..."
28
# Requiring stage file
29
Require_stagefile .stage/config .stage/bootstrap
32
Check_stagefile .stage/chroot_preseed
41
for PRESEED in ${LH_PACKAGES_LISTS} ${LH_TASKS}
43
if [ -f ${LH_BASE:-/usr/share/live-helper}/preseed/"${PRESEED}" ]
46
Check_package chroot/usr/bin/debconf-set-selections debconf
52
cp "${PRESEED}" chroot/root/preseed
54
Chroot chroot "debconf-set-selections /root/preseed"
56
# Removing preseed file
57
rm -f chroot/root/preseed
63
Create_stagefile .stage/chroot_preseed