summaryrefslogtreecommitdiff
path: root/functions/defaults.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-01-31 11:22:23 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:41 +0100
commitfd323f71240c1fa08fd3be20277d1c285dba9957 (patch)
treea90a0772f086585c5183420978ce7baf888c5d67 /functions/defaults.sh
parent2e9433d58d4e03b98981a63a1fac08d038840085 (diff)
downloadlive-build-fd323f71240c1fa08fd3be20277d1c285dba9957.zip
live-build-fd323f71240c1fa08fd3be20277d1c285dba9957.tar.gz
Overwriting the debootstrap or fdisk program if it is set to a value that is not on the host system anymore, but another alternative of it is.
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-xfunctions/defaults.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 7db1389..973bfc0 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -85,7 +85,7 @@ Set_defaults ()
LH_APT_SECURE="${LH_APT_SECURE:-enabled}"
# Setting bootstrap program
- if [ -z "${LH_BOOTSTRAP}" ]
+ if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "${LH_BOOTSTRAP}" ]
then
if [ -x "/usr/sbin/debootstrap" ]
then
@@ -94,8 +94,7 @@ Set_defaults ()
then
LH_BOOTSTRAP="cdebootstrap"
else
- Echo_error "Cannot find /usr/sbin/debootstrap or /usr/bin/cdebootstrap. Please install"
- Echo_error "debootstrap or cdebootstrap, or specify an alternative bootstrapping utility."
+ Echo_error "Cannot find /usr/sbin/debootstrap or /usr/bin/cdebootstrap. Please install debootstrap or cdebootstrap, or specify an alternative bootstrapping utility."
exit 1
fi
fi
@@ -146,7 +145,7 @@ Set_defaults ()
fi
# Setting fdisk
- if [ -z "${LH_FDISK}" ]
+ if [ -z "${LH_FDISK}" ] || [ ! -x "${LH_FDISK}" ]
then
# Workaround for gnu-fdisk divertion
# (gnu-fdisk is buggy, #445304).