summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_preseed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:11 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:30 +0100
commit37a5c53ddd2825bf6b0ce521908a63d419683981 (patch)
tree0b0a8ea3072a4d6b9c37ce8efedb29d25a713e04 /helpers/lh_chroot_preseed
parent85c342c299231131d22764c0dfdcf977c57ce147 (diff)
downloadlive-build-37a5c53ddd2825bf6b0ce521908a63d419683981.zip
live-build-37a5c53ddd2825bf6b0ce521908a63d419683981.tar.gz
Adding live-helper 1.0~a14-1.
Diffstat (limited to 'helpers/lh_chroot_preseed')
-rwxr-xr-xhelpers/lh_chroot_preseed36
1 files changed, 19 insertions, 17 deletions
diff --git a/helpers/lh_chroot_preseed b/helpers/lh_chroot_preseed
index 88f9dd3..02418c7 100755
--- a/helpers/lh_chroot_preseed
+++ b/helpers/lh_chroot_preseed
@@ -32,6 +32,11 @@ 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
@@ -46,30 +51,27 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if [ -n "${LIVE_PRESEED}" ]
+if [ -f "${LIVE_PRESEED}" ]
then
- if [ -f "${LIVE_PRESEED}" ]
- then
- # Check dependency
- Check_package chroot/usr/bin/debconf-set-selections debconf
+ # 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 "${LIVE_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
- fi
+ # Creating stage file
+ Create_stagefile .stage/chroot_preseed
else
Echo_error "'${LIVE_PRESEED}' file doesn't exists."
exit 1