diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:47 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:28 +0100 |
commit | 677415f6d7efc1e5b888570d70af311d2900c69c (patch) | |
tree | 32fe7ced768666c229fff913fe12cbbf2fdd34e4 /functions/defaults.sh | |
parent | 811ff0532fcb3305ebefcd1d61e4eb6c260902eb (diff) | |
download | vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.tar.gz vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.zip |
Adding live-helper 1.0~a2-1.
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-x | functions/defaults.sh | 70 |
1 files changed, 41 insertions, 29 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index 9463ad66a..9ada89eb4 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -55,7 +55,7 @@ Set_defaults () fi # Setting bootstrap program - if [ -z "${LH_BOOTSTRAP}" ] + if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "${LH_BOOTSTRAP}" ] then if [ -x "/usr/bin/cdebootstrap" ] then @@ -87,32 +87,44 @@ Set_defaults () fi # Setting genisoimage - if [ -x /usr/bin/genisoimage ] + if [ -z "${LH_GENISOIMAGE}" ] || [ ! -x "${LH_GENISOIMAGE}" ] then - LH_GENISOIMAGE="genisoimage" - elif [ -x /usr/bin/mkisofs ] - then - LH_GENISOIMAGE="mkisofs" - else - echo "E: cannot find genisoimage nor mkisofs (FIXME)." - exit 1 + if [ -x /usr/bin/genisoimage ] + then + LH_GENISOIMAGE="genisoimage" + elif [ -x /usr/bin/mkisofs ] + then + LH_GENISOIMAGE="mkisofs" + else + echo "E: cannot find genisoimage nor mkisofs (FIXME)." + exit 1 + fi fi - # Setting root directory - if [ -z "${LIVE_ROOT}" ] + # Setting losetup + if [ -z "${LH_LOSETUP}" ] || [ ! -x "${LH_LOSETUP}" ] then - LIVE_ROOT="`pwd`/debian-live" + # Check for loop-aes-utils divertion + if [ -x /sbin/losetup.orig ] + then + LH_LOSETUP="losetup.orig" + elif [ -x /sbin/losetup ] + then + LH_LOSETUP="losetup" + else + echo "E: Can't process file /sbin/losetup (FIXME)" + fi fi - # Setting chroot directory - if [ -z "${LIVE_CHROOT}" ] + # Setting root directory + if [ -z "${LIVE_ROOT}" ] then - LIVE_CHROOT="${LIVE_ROOT}/chroot" + LIVE_ROOT="debian-live" fi ## config/bootstrap - # Setting architecture string + # Setting architecture value if [ -z "${LIVE_ARCHITECTURE}" ] then if [ -x "/usr/bin/dpkg" ] @@ -123,46 +135,46 @@ Set_defaults () fi fi - # Setting distribution string + # Setting distribution value if [ -z "${LIVE_DISTRIBUTION}" ] then LIVE_DISTRIBUTION="sid" fi - # Setting distribution configuration string + # Setting distribution configuration value # LIVE_DISTRIBUTION_CONFIG - # Setting flavour string + # Setting flavour value if [ -z "${LIVE_FLAVOUR}" ] then LIVE_FLAVOUR="standard" fi - # Setting mirror string - if [ -z "${LIVE_MIRROR}" ] + # Setting local mirror value + if [ -z "${LIVE_MIRROR_LOCAL}" ] then - LIVE_MIRROR="http://ftp.debian.org/debian/" + LIVE_MIRROR_LOCAL="http://ftp.debian.org/debian/" fi - # Setting security mirror string - if [ -z "${LIVE_MIRROR_SECURITY}" ] + # Setting local security mirror value + if [ -z "${LIVE_MIRROR_LOCAL_SECURITY}" ] then - LIVE_MIRROR_SECURITY="http://security.debian.org/" + LIVE_MIRROR_LOCAL_SECURITY="http://security.debian.org/" fi - # Setting mirror string + # Setting generic mirror value if [ -z "${LIVE_MIRROR_GENERIC}" ] then LIVE_MIRROR_GENERIC="http://ftp.debian.org/debian/" fi - # Setting security mirror string + # Setting generic security mirror value if [ -z "${LIVE_MIRROR_GENERIC_SECURITY}" ] then LIVE_MIRROR_GENERIC_SECURITY="http://security.debian.org/" fi - # Setting sections string + # Setting sections value if [ -z "${LIVE_SECTIONS}" ] then LIVE_SECTIONS="main" @@ -349,7 +361,7 @@ Set_defaults () # Setting iso volume if [ -z "${LIVE_ISO_VOLUME}" ] then - LIVE_ISO_VOLUME='Debian Live ${DATE}' + LIVE_ISO_VOLUME="Debian Live \`date +%Y%m%d\`" fi # Setting netboot server address |