summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-07 15:11:20 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:21 +0100
commit83bc63f725263c571094e3af1c88c58992bf0ac6 (patch)
tree25be3b96127e122c9f1448f6155dea6b03293248 /functions
parent293765885126c0fe429718f403be2802a225cd68 (diff)
downloadvyos-live-build-83bc63f725263c571094e3af1c88c58992bf0ac6.tar.gz
vyos-live-build-83bc63f725263c571094e3af1c88c58992bf0ac6.zip
Updating internal variables from lh to lb scheme, should be the last piece to finish the live-helper to live-build rename.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/architecture.sh8
-rwxr-xr-xfunctions/cache.sh4
-rwxr-xr-xfunctions/chroot.sh6
-rwxr-xr-xfunctions/conffile.sh6
-rwxr-xr-xfunctions/defaults.sh652
-rwxr-xr-xfunctions/echo.sh2
-rwxr-xr-xfunctions/losetup.sh10
-rwxr-xr-xfunctions/packages.sh20
-rwxr-xr-xfunctions/packageslists.sh62
-rwxr-xr-xfunctions/templates.sh6
-rwxr-xr-xfunctions/wrapper.sh2
11 files changed, 389 insertions, 389 deletions
diff --git a/functions/architecture.sh b/functions/architecture.sh
index 9e6a49abe..b49729348 100755
--- a/functions/architecture.sh
+++ b/functions/architecture.sh
@@ -15,7 +15,7 @@ Check_architecture ()
for ARCHITECTURE in ${ARCHITECTURES}
do
- if [ "$(echo ${LH_ARCHITECTURE} | grep ${ARCHITECTURE})" ]
+ if [ "$(echo ${LB_ARCHITECTURE} | grep ${ARCHITECTURE})" ]
then
VALID="true"
break
@@ -57,13 +57,13 @@ Check_crossarchitecture ()
Check_multiarchitecture ()
{
- if [ "$(echo ${LH_ARCHITECTURE} | wc -w)" -gt "1" ]
+ if [ "$(echo ${LB_ARCHITECTURE} | wc -w)" -gt "1" ]
then
# First, only support multiarch on iso
- case "${LH_BINARY_IMAGES}" in
+ case "${LB_BINARY_IMAGES}" in
iso*)
# Assemble multi-arch
- case "${LH_CURRENT_ARCHITECTURE}" in
+ case "${LB_CURRENT_ARCHITECTURE}" in
amd64)
DESTDIR="${DESTDIR}.amd"
DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
diff --git a/functions/cache.sh b/functions/cache.sh
index b656512f0..bae606dd2 100755
--- a/functions/cache.sh
+++ b/functions/cache.sh
@@ -12,7 +12,7 @@ Restore_cache ()
{
DIRECTORY="${1}"
- if [ "${LH_CACHE}" = "true" ] && [ "${LH_CACHE_PACKAGES}" = "true" ]
+ if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
then
if [ -d "${DIRECTORY}" ]
then
@@ -33,7 +33,7 @@ Save_cache ()
{
DIRECTORY="${1}"
- if [ "${LH_CACHE}" = "true" ] && [ "${LH_CACHE_PACKAGES}" = "true" ]
+ if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
then
# Cleaning current cache
Chroot chroot "apt-get autoclean"
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 77d777a80..589200add 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -16,12 +16,12 @@ Chroot ()
# Executing commands in chroot
Echo_debug "Executing: %s" "${COMMANDS}"
- if [ "${LH_USE_FAKEROOT}" != "true" ]
+ if [ "${LB_USE_FAKEROOT}" != "true" ]
then
- ${LH_ROOT_COMMAND} /usr/sbin/chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" ftp_proxy="${LH_APT_FTP_PROXY}" http_proxy="${LH_APT_HTTP_PROXY}" DEBIAN_FRONTEND="${LH_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LH_DEBCONF_PRIORITY}" DEBCONF_NOWARNINGS="${LH_DEBCONF_NOWARNINGS}" XORG_CONFIG="custom" ${COMMANDS}
+ ${LB_ROOT_COMMAND} /usr/sbin/chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" ftp_proxy="${LB_APT_FTP_PROXY}" http_proxy="${LB_APT_HTTP_PROXY}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NOWARNINGS="${LB_DEBCONF_NOWARNINGS}" XORG_CONFIG="custom" ${COMMANDS}
else
# Building with fakeroot/fakechroot
- ${LH_ROOT_COMMAND} /usr/sbin/chroot "${CHROOT}" ${COMMANDS}
+ ${LB_ROOT_COMMAND} /usr/sbin/chroot "${CHROOT}" ${COMMANDS}
fi
return "${?}"
diff --git a/functions/conffile.sh b/functions/conffile.sh
index c08d3469a..02730dfd8 100755
--- a/functions/conffile.sh
+++ b/functions/conffile.sh
@@ -10,13 +10,13 @@
Get_conffiles ()
{
- if [ -n "${LH_CONFIG}" ]
+ if [ -n "${LB_CONFIG}" ]
then
- FILES="${LH_CONFIG}"
+ FILES="${LB_CONFIG}"
else
for FILE in ${@}
do
- FILES="${FILES} ${FILE} ${FILE}.${LH_ARCHITECTURE} ${FILE}.${DISTRIBUTION}"
+ FILES="${FILES} ${FILE} ${FILE}.${LB_ARCHITECTURE} ${FILE}.${DISTRIBUTION}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${DISTRIBUTION}"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index c55c8b1c7..b9b475ff2 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -12,62 +12,62 @@ Set_defaults ()
{
## config/common
- LH_BASE="${LH_BASE:-/usr/share/live/build}"
+ LB_BASE="${LB_BASE:-/usr/share/live/build}"
# Setting mode
- if [ -z "${LH_MODE}" ]
+ if [ -z "${LB_MODE}" ]
then
- LH_MODE="debian"
+ LB_MODE="debian"
fi
# Setting distribution name
- if [ -z "${LH_DISTRIBUTION}" ]
+ if [ -z "${LB_DISTRIBUTION}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_DISTRIBUTION="squeeze"
+ LB_DISTRIBUTION="squeeze"
;;
emdebian)
- LH_DISTRIBUTION="sid"
+ LB_DISTRIBUTION="sid"
;;
ubuntu)
- LH_DISTRIBUTION="karmic"
+ LB_DISTRIBUTION="karmic"
;;
esac
fi
# Setting package manager
- LH_APT="${LH_APT:-apt}"
+ LB_APT="${LB_APT:-apt}"
# Setting apt ftp proxy
- if [ -z "${LH_APT_FTP_PROXY}" ] && [ -n "${ftp_proxy}" ]
+ if [ -z "${LB_APT_FTP_PROXY}" ] && [ -n "${ftp_proxy}" ]
then
- LH_APT_FTP_PROXY="${ftp_proxy}"
+ LB_APT_FTP_PROXY="${ftp_proxy}"
else
- if [ -n "${LH_APT_FTP_PROXY}" ] && [ "${LH_APT_FTP_PROXY}" != "${ftp_proxy}" ]
+ if [ -n "${LB_APT_FTP_PROXY}" ] && [ "${LB_APT_FTP_PROXY}" != "${ftp_proxy}" ]
then
- ftp_proxy="${LH_APT_FTP_PROXY}"
+ ftp_proxy="${LB_APT_FTP_PROXY}"
fi
fi
# Setting apt http proxy
- if [ -z "${LH_APT_HTTP_PROXY}" ] && [ -n "${http_proxy}" ]
+ if [ -z "${LB_APT_HTTP_PROXY}" ] && [ -n "${http_proxy}" ]
then
- LH_APT_HTTP_PROXY="${http_proxy}"
+ LB_APT_HTTP_PROXY="${http_proxy}"
else
- if [ -n "${LH_APT_HTTP_PROXY}" ] && [ "${LH_APT_HTT_PROXY}" != "${http_proxy}" ]
+ if [ -n "${LB_APT_HTTP_PROXY}" ] && [ "${LB_APT_HTT_PROXY}" != "${http_proxy}" ]
then
- http_proxy="${LH_APT_HTTP_PROXY}"
+ http_proxy="${LB_APT_HTTP_PROXY}"
fi
fi
# Setting apt pdiffs
- LH_APT_PDIFFS="${LH_APT_PDIFFS:-true}"
+ LB_APT_PDIFFS="${LB_APT_PDIFFS:-true}"
# Setting apt pipeline
- # LH_APT_PIPELINE
+ # LB_APT_PIPELINE
APT_OPTIONS="${APT_OPTIONS:---yes}"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes}"
@@ -80,28 +80,28 @@ Set_defaults ()
fi
# Setting apt recommends
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release|ubuntu)
- LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS:-true}"
+ LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-true}"
;;
emdebian)
- LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS:-false}"
+ LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-false}"
;;
esac
# Setting apt secure
- LH_APT_SECURE="${LH_APT_SECURE:-true}"
+ LB_APT_SECURE="${LB_APT_SECURE:-true}"
# Setting bootstrap program
- if [ -z "${LH_BOOTSTRAP}" ] || ( [ ! -x "$(which ${LH_BOOTSTRAP} 2>/dev/null)" ] && [ "${LH_BOOTSTRAP}" != "copy" ] )
+ if [ -z "${LB_BOOTSTRAP}" ] || ( [ ! -x "$(which ${LB_BOOTSTRAP} 2>/dev/null)" ] && [ "${LB_BOOTSTRAP}" != "copy" ] )
then
if [ -x "/usr/sbin/debootstrap" ]
then
- LH_BOOTSTRAP="debootstrap"
+ LB_BOOTSTRAP="debootstrap"
elif [ -x "/usr/bin/cdebootstrap" ]
then
- LH_BOOTSTRAP="cdebootstrap"
+ LB_BOOTSTRAP="cdebootstrap"
else
Echo_error "Cannot find /usr/sbin/debootstrap or /usr/bin/cdebootstrap. Please install debootstrap or cdebootstrap, or specify an alternative bootstrapping utility."
exit 1
@@ -109,72 +109,72 @@ Set_defaults ()
fi
# Setting cache option
- LH_CACHE="${LH_CACHE:-true}"
- LH_CACHE_INDICES="${LH_CACHE_INDICES:-false}"
- LH_CACHE_PACKAGES="${LH_CACHE_PACKAGES:-true}"
- LH_CACHE_STAGES="${LH_CACHE_STAGES:-bootstrap}"
+ LB_CACHE="${LB_CACHE:-true}"
+ LB_CACHE_INDICES="${LB_CACHE_INDICES:-false}"
+ LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES:-true}"
+ LB_CACHE_STAGES="${LB_CACHE_STAGES:-bootstrap}"
# Setting debconf frontend
- LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND:-noninteractive}"
- LH_DEBCONF_NOWARNINGS="${LH_DEBCONF_NOWARNINGS:-yes}"
- LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY:-critical}"
+ LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND:-noninteractive}"
+ LB_DEBCONF_NOWARNINGS="${LB_DEBCONF_NOWARNINGS:-yes}"
+ LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY:-critical}"
- case "${LH_DEBCONF_NOWARNINGS}" in
+ case "${LB_DEBCONF_NOWARNINGS}" in
true)
- LH_DEBCONF_NOWARNINGS="yes"
+ LB_DEBCONF_NOWARNINGS="yes"
;;
false)
- LH_DEBCONF_NOWARNINGS="no"
+ LB_DEBCONF_NOWARNINGS="no"
;;
esac
# Setting initramfs hook
- if [ -z "${LH_INITRAMFS}" ]
+ if [ -z "${LB_INITRAMFS}" ]
then
- LH_INITRAMFS="auto"
+ LB_INITRAMFS="auto"
else
- if [ "${LH_INITRAMFS}" = "auto" ]
+ if [ "${LB_INITRAMFS}" = "auto" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_INITRAMFS="casper"
+ LB_INITRAMFS="casper"
;;
*)
- LH_INITRAMFS="live-initramfs"
+ LB_INITRAMFS="live-initramfs"
;;
esac
fi
fi
# Setting fdisk
- if [ -z "${LH_FDISK}" ] || [ ! -x "${LH_FDISK}" ]
+ if [ -z "${LB_FDISK}" ] || [ ! -x "${LB_FDISK}" ]
then
# Workaround for gnu-fdisk divertion
# (gnu-fdisk is buggy, #445304).
if [ -x /sbin/fdisk.distrib ]
then
- LH_FDISK="fdisk.distrib"
+ LB_FDISK="fdisk.distrib"
elif [ -x /sbin/fdisk ]
then
- LH_FDISK="fdisk"
+ LB_FDISK="fdisk"
else
Echo_error "Can't process file /sbin/fdisk"
fi
fi
# Setting losetup
- if [ -z "${LH_LOSETUP}" ] || [ "${LH_LOSETUP}" != "/sbin/losetup.orig" ]
+ if [ -z "${LB_LOSETUP}" ] || [ "${LB_LOSETUP}" != "/sbin/losetup.orig" ]
then
# Workaround for loop-aes-utils divertion
# (loop-aes-utils' losetup lacks features).
if [ -x /sbin/losetup.orig ]
then
- LH_LOSETUP="losetup.orig"
+ LB_LOSETUP="losetup.orig"
elif [ -x /sbin/losetup ]
then
- LH_LOSETUP="losetup"
+ LB_LOSETUP="losetup"
else
Echo_error "Can't process file /sbin/losetup"
fi
@@ -183,47 +183,47 @@ Set_defaults ()
if [ "$(id -u)" = "0" ]
then
# If we are root, disable root command
- LH_ROOT_COMMAND=""
+ LB_ROOT_COMMAND=""
else
if [ -x /usr/bin/sudo ]
then
# FIXME: this is false until considered safe
- #LH_ROOT_COMMAND="sudo"
- LH_ROOT_COMMAND=""
+ #LB_ROOT_COMMAND="sudo"
+ LB_ROOT_COMMAND=""
fi
fi
# Setting tasksel
- LH_TASKSEL="${LH_TASKSEL:-tasksel}"
+ LB_TASKSEL="${LB_TASKSEL:-tasksel}"
# Setting root directory
- if [ -z "${LH_ROOT}" ]
+ if [ -z "${LB_ROOT}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_ROOT="debian-live"
+ LB_ROOT="debian-live"
;;
emdebian)
- LH_ROOT="emdebian-live"
+ LB_ROOT="emdebian-live"
;;
ubuntu)
- LH_ROOT="ubuntu-live"
+ LB_ROOT="ubuntu-live"
;;
esac
fi
# Setting includes
- if [ -z "${LH_INCLUDES}" ]
+ if [ -z "${LB_INCLUDES}" ]
then
- LH_INCLUDES="${LH_BASE}/includes"
+ LB_INCLUDES="${LB_BASE}/includes"
fi
# Setting templates
- if [ -z "${LH_TEMPLATES}" ]
+ if [ -z "${LB_TEMPLATES}" ]
then
- LH_TEMPLATES="${LH_BASE}/templates"
+ LB_TEMPLATES="${LB_BASE}/templates"
fi
# Setting live helper options
@@ -237,94 +237,94 @@ Set_defaults ()
## config/bootstrap
# Setting architecture value
- if [ -z "${LH_ARCHITECTURE}" ]
+ if [ -z "${LB_ARCHITECTURE}" ]
then
if [ -x "/usr/bin/dpkg" ]
then
- LH_ARCHITECTURE="$(dpkg --print-architecture)"
+ LB_ARCHITECTURE="$(dpkg --print-architecture)"
else
case "$(uname -m)" in
sparc|powerpc)
- LH_ARCHITECTURE="$(uname -m)"
+ LB_ARCHITECTURE="$(uname -m)"
;;
x86_64)
- LH_ARCHITECTURE="amd64"
+ LB_ARCHITECTURE="amd64"
;;
*)
Echo_warning "Can't determine architecture, assuming i386"
- LH_ARCHITECTURE="i386"
+ LB_ARCHITECTURE="i386"
;;
esac
fi
fi
# Include packages on base
- # LH_BOOTSTRAP_INCLUDE
+ # LB_BOOTSTRAP_INCLUDE
# Exclude packages on base
- # LH_BOOTSTRAP_EXCLUDE
+ # LB_BOOTSTRAP_EXCLUDE
# Setting distribution configuration value
- # LH_BOOTSTRAP_CONFIG
+ # LB_BOOTSTRAP_CONFIG
# Setting flavour value
- case "${LH_BOOTSTRAP}" in
+ case "${LB_BOOTSTRAP}" in
cdebootstrap)
- LH_BOOTSTRAP_FLAVOUR="${LH_BOOTSTRAP_FLAVOUR:-standard}"
+ LB_BOOTSTRAP_FLAVOUR="${LB_BOOTSTRAP_FLAVOUR:-standard}"
;;
esac
# Setting bootstrap keyring
- # LH_BOOTSTRAP_KEYRING
+ # LB_BOOTSTRAP_KEYRING
# Setting mirror to fetch packages from
- if [ -z "${LH_MIRROR_BOOTSTRAP}" ]
+ if [ -z "${LB_MIRROR_BOOTSTRAP}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
+ LB_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
;;
emdebian)
- LH_MIRROR_BOOTSTRAP="http://buildd.emdebian.org/grip/"
+ LB_MIRROR_BOOTSTRAP="http://buildd.emdebian.org/grip/"
;;
ubuntu)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/"
+ LB_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/"
;;
*)
- LH_MIRROR_BOOTSTRAP="http://ports.ubuntu.com/"
+ LB_MIRROR_BOOTSTRAP="http://ports.ubuntu.com/"
;;
esac
;;
esac
fi
- LH_MIRROR_CHROOT="${LH_MIRROR_CHROOT:-${LH_MIRROR_BOOTSTRAP}}"
+ LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
# Setting security mirror to fetch packages from
- if [ -z "${LH_MIRROR_CHROOT_SECURITY}" ]
+ if [ -z "${LB_MIRROR_CHROOT_SECURITY}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_MIRROR_CHROOT_SECURITY="http://security.debian.org/"
+ LB_MIRROR_CHROOT_SECURITY="http://security.debian.org/"
;;
emdebian)
- LH_MIRROR_CHROOT_SECURITY="none"
+ LB_MIRROR_CHROOT_SECURITY="none"
;;
ubuntu)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/"
+ LB_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/"
;;
*)
- LH_MIRROR_CHROOT_SECURITY="http://ports.ubuntu.com/"
+ LB_MIRROR_CHROOT_SECURITY="http://ports.ubuntu.com/"
;;
esac
;;
@@ -332,53 +332,53 @@ Set_defaults ()
fi
# Setting volatile mirror to fetch packages from
- if [ -z "${LH_MIRROR_CHROOT_VOLATILE}" ]
+ if [ -z "${LB_MIRROR_CHROOT_VOLATILE}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_MIRROR_CHROOT_VOLATILE="http://volatile.debian.org/debian-volatile/"
+ LB_MIRROR_CHROOT_VOLATILE="http://volatile.debian.org/debian-volatile/"
;;
esac
;;
ubuntu)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/"
+ LB_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/"
;;
*)
- LH_MIRROR_CHROOT_VOLATILE="http://ports.ubuntu.com/"
+ LB_MIRROR_CHROOT_VOLATILE="http://ports.ubuntu.com/"
;;
esac
;;
esac
- LH_MIRROR_CHROOT_VOLATILE="${LH_MIRROR_CHROOT_VOLATILE:-none}"
+ LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-none}"
fi
# Setting mirror which ends up in the image
- if [ -z "${LH_MIRROR_BINARY}" ]
+ if [ -z "${LB_MIRROR_BINARY}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_MIRROR_BINARY="http://cdn.debian.net/debian/"
+ LB_MIRROR_BINARY="http://cdn.debian.net/debian/"
;;
emdebian)
- LH_MIRROR_BINARY="http://buildd.emdebian.org/grip/"
+ LB_MIRROR_BINARY="http://buildd.emdebian.org/grip/"
;;
ubuntu)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/"
+ LB_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/"
;;
*)
- LH_MIRROR_BINARY="http://ports.ubuntu.com/"
+ LB_MIRROR_BINARY="http://ports.ubuntu.com/"
;;
esac
;;
@@ -386,25 +386,25 @@ Set_defaults ()
fi
# Setting security mirror which ends up in the image
- if [ -z "${LH_MIRROR_BINARY_SECURITY}" ]
+ if [ -z "${LB_MIRROR_BINARY_SECURITY}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_MIRROR_BINARY_SECURITY="http://security.debian.org/"
+ LB_MIRROR_BINARY_SECURITY="http://security.debian.org/"
;;
emdebian)
- LH_MIRROR_BINARY_SECURITY="none"
+ LB_MIRROR_BINARY_SECURITY="none"
;;
ubuntu)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/"
+ LB_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/"
;;
*)
- LH_MIRROR_BINARY_SECURITY="http://ports.ubuntu.com/"
+ LB_MIRROR_BINARY_SECURITY="http://ports.ubuntu.com/"
;;
esac
;;
@@ -412,45 +412,45 @@ Set_defaults ()
fi
# Setting volatile mirror which ends up in the image
- if [ -z "${LH_MIRROR_BINARY_VOLATILE}" ]
+ if [ -z "${LB_MIRROR_BINARY_VOLATILE}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_MIRROR_BINARY_VOLATILE="http://volatile.debian.org/debian-volatile/"
+ LB_MIRROR_BINARY_VOLATILE="http://volatile.debian.org/debian-volatile/"
;;
esac
;;
ubuntu)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/"
+ LB_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/"
;;
*)
- LH_MIRROR_BINARY_VOLATILE="http://ports.ubuntu.com/"
+ LB_MIRROR_BINARY_VOLATILE="http://ports.ubuntu.com/"
;;
esac
;;
esac
- LH_MIRROR_BINARY_VOLATILE="${LH_MIRROR_BINARY_VOLATILE:-none}"
+ LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE:-none}"
fi
- LH_MIRROR_DEBIAN_INSTALLER="${LH_MIRROR_DEBIAN_INSTALLER:-${LH_MIRROR_BOOTSTRAP}}"
+ LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_BOOTSTRAP}}"
# Setting archive areas value
- if [ -z "${LH_ARCHIVE_AREAS}" ]
+ if [ -z "${LB_ARCHIVE_AREAS}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_ARCHIVE_AREAS="main restricted"
+ LB_ARCHIVE_AREAS="main restricted"
;;
*)
- LH_ARCHIVE_AREAS="main"
+ LB_ARCHIVE_AREAS="main"
;;
esac
fi
@@ -458,44 +458,44 @@ Set_defaults ()
## config/chroot
# Setting chroot filesystem
- LH_CHROOT_FILESYSTEM="${LH_CHROOT_FILESYSTEM:-squashfs}"
+ LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
# Setting virtual root size
- LH_VIRTUAL_ROOT_SIZE="${LH_VIRTUAL_ROOT_SIZE:-10000}"
+ LB_VIRTUAL_ROOT_SIZE="${LB_VIRTUAL_ROOT_SIZE:-10000}"
# Setting whether to expose root filesystem as read only
- LH_EXPOSED_ROOT="${LH_EXPOSED_ROOT:-false}"
+ LB_EXPOSED_ROOT="${LB_EXPOSED_ROOT:-false}"
# Setting union filesystem
- LH_UNION_FILESYSTEM="${LH_UNION_FILESYSTEM:-aufs}"
+ LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}"
- # LH_HOOKS
+ # LB_HOOKS
# Setting interactive shell/X11/Xnest
- LH_INTERACTIVE="${LH_INTERACTIVE:-false}"
+ LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
# Setting keyring packages
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_KEYRING_PACKAGES="${LH_KEYRING_PACKAGES:-debian-archive-keyring}"
+ LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
;;
emdebian)
- LH_KEYRING_PACKAGES="${LH_KEYRING_PACKAGES:-debian-archive-keyring}"
+ LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
;;
ubuntu)
- LH_KEYRING_PACKAGES="${LH_KEYRING_PACKAGES:-ubuntu-keyring}"
+ LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-ubuntu-keyring}"
;;
esac
# Setting language string
- LH_LANGUAGE="${LH_LANGUAGE:-en}"
+ LB_LANGUAGE="${LB_LANGUAGE:-en}"
# Setting linux flavour string
- if [ -z "${LH_LINUX_FLAVOURS}" ]
+ if [ -z "${LB_LINUX_FLAVOURS}" ]
then
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
arm|armel)
Echo_error "There is no default kernel flavour defined for your architecture."
Echo_error "Please configure it manually with 'lb config -k FLAVOUR'."
@@ -503,56 +503,56 @@ Set_defaults ()
;;
alpha)
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- Echo_error "Architecture ${LH_ARCHITECTURE} not supported on Ubuntu."
+ Echo_error "Architecture ${LB_ARCHITECTURE} not supported on Ubuntu."
exit 1
;;
*)
- LH_LINUX_FLAVOURS="alpha-generic"
+ LB_LINUX_FLAVOURS="alpha-generic"
;;
esac
;;
amd64)
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_LINUX_FLAVOURS="generic"
+ LB_LINUX_FLAVOURS="generic"
;;
*)
- LH_LINUX_FLAVOURS="amd64"
+ LB_LINUX_FLAVOURS="amd64"
;;
esac
;;
hppa)
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_LINUX_FLAVOURS="hppa32 hppa64"
+ LB_LINUX_FLAVOURS="hppa32 hppa64"
;;
*)
- LH_LINUX_FLAVOURS="parisc"
+ LB_LINUX_FLAVOURS="parisc"
;;
esac
;;
i386)
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_LINUX_FLAVOURS="generic"
+ LB_LINUX_FLAVOURS="generic"
;;
*)
case "${LIST}" in
stripped|minimal)
- LH_LINUX_FLAVOURS="486"
+ LB_LINUX_FLAVOURS="486"
;;
*)
- LH_LINUX_FLAVOURS="486 686"
+ LB_LINUX_FLAVOURS="486 686"
;;
esac
;;
@@ -560,547 +560,547 @@ Set_defaults ()
;;
ia64)
- LH_LINUX_FLAVOURS="itanium"
+ LB_LINUX_FLAVOURS="itanium"
;;
powerpc)
case "${LIST}" in
stripped|minimal)
- LH_LINUX_FLAVOURS="powerpc"
+ LB_LINUX_FLAVOURS="powerpc"
;;
*)
- LH_LINUX_FLAVOURS="powerpc powerpc64"
+ LB_LINUX_FLAVOURS="powerpc powerpc64"
;;
esac
;;
s390)
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- Echo_error "Architecture ${LH_ARCHITECTURE} not supported on Ubuntu."
+ Echo_error "Architecture ${LB_ARCHITECTURE} not supported on Ubuntu."
exit 1
;;
*)
- LH_LINUX_FLAVOURS="s390"
+ LB_LINUX_FLAVOURS="s390"
;;
esac
;;
sparc)
- LH_LINUX_FLAVOURS="sparc64"
+ LB_LINUX_FLAVOURS="sparc64"
;;
*)
- Echo_error "Architecture ${LH_ARCHITECTURE} not yet supported (FIXME)"
+ Echo_error "Architecture ${LB_ARCHITECTURE} not yet supported (FIXME)"
exit 1
;;
esac
fi
# Set linux packages
- if [ -z "${LH_LINUX_PACKAGES}" ]
+ if [ -z "${LB_LINUX_PACKAGES}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release|embedian)
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_LINUX_PACKAGES="linux-image-2.6 \${LH_UNION_FILESYSTEM}-modules-2.6"
+ LB_LINUX_PACKAGES="linux-image-2.6 \${LB_UNION_FILESYSTEM}-modules-2.6"
;;
*)
- LH_LINUX_PACKAGES="linux-image-2.6"
+ LB_LINUX_PACKAGES="linux-image-2.6"
;;
esac
- if [ "${LH_CHROOT_FILESYSTEM}" = "squashfs" ]
+ if [ "${LB_CHROOT_FILESYSTEM}" = "squashfs" ]
then
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES} squashfs-modules-2.6"
+ LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES} squashfs-modules-2.6"
;;
esac
fi
- case "${LH_ENCRYPTION}" in
+ case "${LB_ENCRYPTION}" in
""|false)
;;
*)
- LH_LINUX_PACKAGES="${LH_LINUX_PACKAGES} loop-aes-modules-2.6"
+ LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES} loop-aes-modules-2.6"
;;
esac
;;
ubuntu)
- LH_LINUX_PACKAGES="linux"
+ LB_LINUX_PACKAGES="linux"
;;
esac
fi
# Setting packages string
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_PACKAGES="${LH_PACKAGES:-ubuntu-minimal}"
+ LB_PACKAGES="${LB_PACKAGES:-ubuntu-minimal}"
;;
*)
- LH_PACKAGES_LISTS="${LH_PACKAGES_LISTS:-standard}"
+ LB_PACKAGES_LISTS="${LB_PACKAGES_LISTS:-standard}"
;;
esac
- case "${LH_ENCRYPTION}" in
+ case "${LB_ENCRYPTION}" in
""|false)
;;
*)
- if ! In_list loop-aes-utils "${LH_PACKAGES}"
+ if ! In_list loop-aes-utils "${LB_PACKAGES}"
then
- LH_PACKAGES="${LH_PACKAGES} loop-aes-utils"
+ LB_PACKAGES="${LB_PACKAGES} loop-aes-utils"
fi
;;
esac
# Setting tasks string
- for LIST in ${LH_PACKAGES_LISTS}
+ for LIST in ${LB_PACKAGES_LISTS}
do
case "${LIST}" in
stripped|minimal)
- LH_APT="apt-get"
+ LB_APT="apt-get"
;;
gnome-desktop)
- LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|gnome-desktop||') standard-x11"
- case "${LH_DISTRIBUTION}" in
+ LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|gnome-desktop||') standard-x11"
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|gnome-desktop||' -e 's|desktop||') standard gnome-desktop desktop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|gnome-desktop||' -e 's|desktop||') standard gnome-desktop desktop"
;;
*)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|gnome-desktop||' -e 's|desktop||' -e 's|laptop||') standard gnome-desktop desktop laptop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|gnome-desktop||' -e 's|desktop||' -e 's|laptop||') standard gnome-desktop desktop laptop"
;;
esac
;;
kde-desktop)
- LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|kde-desktop||') standard-x11"
+ LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|kde-desktop||') standard-x11"
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|kde-desktop||' -e 's|desktop||') standard kde-desktop desktop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|kde-desktop||' -e 's|desktop||') standard kde-desktop desktop"
;;
*)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|kde-desktop||' -e 's|desktop||' -e 's|laptop||') standard kde-desktop desktop laptop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|kde-desktop||' -e 's|desktop||' -e 's|laptop||') standard kde-desktop desktop laptop"
esac
;;
lxde-desktop)
- LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|lxde-desktop||') standard-x11"
+ LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|lxde-desktop||') standard-x11"
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|lxde-desktop||' -e 's|desktop||') standard lxde-desktop desktop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|lxde-desktop||' -e 's|desktop||') standard lxde-desktop desktop"
;;
*)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|lxde-desktop||' -e 's|desktop||' -e 's|laptop||') standard lxde-desktop desktop laptop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|lxde-desktop||' -e 's|desktop||' -e 's|laptop||') standard lxde-desktop desktop laptop"
;;
esac
;;
xfce-desktop)
- LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|xfce-desktop||') standard-x11"
+ LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|xfce-desktop||') standard-x11"
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
lenny)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|xfce-desktop||' -e 's|desktop||') standard xfce-desktop desktop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|xfce-desktop||' -e 's|desktop||') standard xfce-desktop desktop"
;;
*)
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|xfce-desktop||' -e 's|desktop||' -e 's|laptop||') standard xfce-desktop desktop laptop"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|xfce-desktop||' -e 's|desktop||' -e 's|laptop||') standard xfce-desktop desktop laptop"
;;
esac
;;
esac
done
- LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's| ||g')"
- LH_TASKS="$(echo ${LH_TASKS} | sed -e 's| ||g')"
+ LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's| ||g')"
+ LB_TASKS="$(echo ${LB_TASKS} | sed -e 's| ||g')"
# Setting security updates option
- if [ "${LH_MIRROR_CHROOT_SECURITY}" = "none" ] || [ "${LH_MIRROR_BINARY_SECURITY}" = "none" ]
+ if [ "${LB_MIRROR_CHROOT_SECURITY}" = "none" ] || [ "${LB_MIRROR_BINARY_SECURITY}" = "none" ]
then
- LH_SECURITY="false"
+ LB_SECURITY="false"
fi
- LH_SECURITY="${LH_SECURITY:-true}"
+ LB_SECURITY="${LB_SECURITY:-true}"
# Setting volatile updates option
- if [ "${LH_MIRROR_CHROOT_VOLATILE}" = "none" ] || [ "${LH_MIRROR_BINARY_VOLATILE}" = "none" ]
+ if [ "${LB_MIRROR_CHROOT_VOLATILE}" = "none" ] || [ "${LB_MIRROR_BINARY_VOLATILE}" = "none" ]
then
- LH_VOLATILE="false"
+ LB_VOLATILE="false"
fi
- LH_VOLATILE="${LH_VOLATILE:-true}"
+ LB_VOLATILE="${LB_VOLATILE:-true}"
# Setting symlink convertion option
- LH_SYMLINKS="${LH_SYMLINKS:-false}"
+ LB_SYMLINKS="${LB_SYMLINKS:-false}"
# Setting sysvinit option
- LH_SYSVINIT="${LH_SYSVINIT:-false}"
+ LB_SYSVINIT="${LB_SYSVINIT:-false}"
## config/binary
# Setting image filesystem
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
sparc)
- LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM:-ext2}"
+ LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-ext2}"
;;
*)
- LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM:-fat16}"
+ LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat16}"
;;
esac
# Setting image type
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
squeeze|sid)
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso-hybrid}"
+ LB_BINARY_IMAGES="${LB_BINARY_IMAGES:-iso-hybrid}"
;;
*)
- LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"
+ LB_BINARY_IMAGES="${LB_BINARY_IMAGES:-iso}"
;;
esac
;;
*)
- LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"
+ LB_BINARY_IMAGES="${LB_BINARY_IMAGES:-iso}"
;;
esac
# Setting apt indices
- if echo ${LH_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
+ if echo ${LB_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
then
- LH_BINARY_INDICES="${LH_BINARY_INDICES:-none}"
+ LB_BINARY_INDICES="${LB_BINARY_INDICES:-none}"
else
- LH_BINARY_INDICES="${LH_BINARY_INDICES:-true}"
+ LB_BINARY_INDICES="${LB_BINARY_INDICES:-true}"
fi
# Setting bootloader
- if [ -z "${LH_BOOTLOADER}" ]
+ if [ -z "${LB_BOOTLOADER}" ]
then
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- LH_BOOTLOADER="syslinux"
+ LB_BOOTLOADER="syslinux"
;;
powerpc)
- LH_BOOTLOADER="yaboot"
+ LB_BOOTLOADER="yaboot"
;;
sparc)
- LH_BOOTLOADER="silo"
+ LB_BOOTLOADER="silo"
;;
esac
fi
# Setting checksums
- LH_CHECKSUMS="${LH_CHECKSUMS:-md5}"
+ LB_CHECKSUMS="${LB_CHECKSUMS:-md5}"
# Setting chroot option
- LH_BUILD_WITH_CHROOT="${LH_BUILD_WITH_CHROOT:-true}"
+ LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT:-true}"
# Setting debian-installer option
- LH_DEBIAN_INSTALLER="${LH_DEBIAN_INSTALLER:-false}"
+ LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-false}"
# Setting debian-installer distribution
- LH_DEBIAN_INSTALLER_DISTRIBUTION="${LH_DEBIAN_INSTALLER_DISTRIBUTION:-${LH_DISTRIBUTION}}"
+ LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
# Setting debian-installer-gui
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian)
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
squeeze|sid)
- LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-false}"
+ LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-false}"
;;
*)
- LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-true}"
+ LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}"
;;
esac
;;
ubuntu)
- case "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" in
+ case "${LB_DEBIAN_INSTALLER_DISTRIBUTION}" in
karmic)
# Not available for Karmic currently.
- LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-false}"
+ LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-false}"
;;
*)
- LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-true}"
+ LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}"
;;
esac
;;
*)
- LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-false}"
+ LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-false}"
;;
esac
# Setting debian-installer preseed filename
- if [ -z "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ]
+ if [ -z "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
if Find_files config/binary_debian-installer/preseed.cfg
then
- LH_DEBIAN_INSTALLER_PRESEEDFILE="/preseed.cfg"
+ LB_DEBIAN_INSTALLER_PRESEEDFILE="/preseed.cfg"
fi
if Find_files config/binary_debian-installer/*.cfg && [ ! -e config/binary_debian-installer/preseed.cfg ]
then
- Echo_warning "You have placed some preseeding files into config/binary_debian-installer but you didn't specify the default preseeding file through LH_DEBIAN_INSTALLER_PRESEEDFILE. This means that debian-installer will not take up a preseeding file by default."
+ Echo_warning "You have placed some preseeding files into config/binary_debian-installer but you didn't specify the default preseeding file through LB_DEBIAN_INSTALLER_PRESEEDFILE. This means that debian-installer will not take up a preseeding file by default."
fi
fi
# Setting boot parameters
- # LH_BOOTAPPEND_LIVE
- if [ -n "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ]
+ # LB_BOOTAPPEND_LIVE
+ if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
- case "${LH_BINARY_IMAGES}" in
+ case "${LB_BINARY_IMAGES}" in
iso*)
- _LH_BOOTAPPEND_PRESEED="file=/cdrom/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+ _LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
usb*)
- if [ "${LH_MODE}" = "ubuntu" ] || [ "${LH_DEBIAN_INSTALLER}" = "live" ]
+ if [ "${LB_MODE}" = "ubuntu" ] || [ "${LB_DEBIAN_INSTALLER}" = "live" ]
then
- _LH_BOOTAPPEND_PRESEED="file=/cdrom/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+ _LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
else
- _LH_BOOTAPPEND_PRESEED="file=/hd-media/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+ _LB_BOOTAPPEND_PRESEED="file=/hd-media/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
fi
;;
net)
- case "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" in
+ case "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" in
*://*)
- _LH_BOOTAPPEND_PRESEED="file=${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+ _LB_BOOTAPPEND_PRESEED="file=${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
*)
- _LH_BOOTAPPEND_PRESEED="file=/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+ _LB_BOOTAPPEND_PRESEED="file=/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
esac
;;
esac
fi
- case "${LH_BINARY_IMAGES}" in
+ case "${LB_BINARY_IMAGES}" in
iso-hybrid|usb*)
# Try USB block devices for install media
- if ! echo "${LH_BOOTAPPEND_INSTALL}" | grep -q try-usb
+ if ! echo "${LB_BOOTAPPEND_INSTALL}" | grep -q try-usb
then
- LH_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true ${LH_BOOTAPPEND_INSTALL}"
+ LB_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true ${LB_BOOTAPPEND_INSTALL}"
fi
;;
esac
- if [ -n ${_LH_BOOTAPPEND_PRESEED} ]
+ if [ -n ${_LB_BOOTAPPEND_PRESEED} ]
then
- LH_BOOTAPPEND_INSTALL="${LH_BOOTAPPEND_INSTALL} ${_LH_BOOTAPPEND_PRESEED}"
+ LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL} ${_LB_BOOTAPPEND_PRESEED}"
fi
- LH_BOOTAPPEND_INSTALL="$(echo ${LH_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
+ LB_BOOTAPPEND_INSTALL="$(echo ${LB_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
# Setting encryption
- LH_ENCRYPTION="${LH_ENCRYPTION:-false}"
+ LB_ENCRYPTION="${LB_ENCRYPTION:-false}"
# Setting grub splash
- # LH_GRUB_SPLASH
+ # LB_GRUB_SPLASH
# Setting hostname
- if [ -z "${LH_HOSTNAME}" ]
+ if [ -z "${LB_HOSTNAME}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
embedian)
- LH_HOSTNAME="embedian"
+ LB_HOSTNAME="embedian"
;;
ubuntu)
- LH_HOSTNAME="ubuntu"
+ LB_HOSTNAME="ubuntu"
;;
*)
- LH_HOSTNAME="debian"
+ LB_HOSTNAME="debian"
;;
esac
fi
# Setting iso author
- if [ -z "${LH_ISO_APPLICATION}" ]
+ if [ -z "${LB_ISO_APPLICATION}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_ISO_APPLICATION="Debian Live"
+ LB_ISO_APPLICATION="Debian Live"
;;
emdebian)
- LH_ISO_APPLICATION="Emdebian Live"
+ LB_ISO_APPLICATION="Emdebian Live"
;;
ubuntu)
- LH_ISO_APPLICATION="Ubuntu Live"
+ LB_ISO_APPLICATION="Ubuntu Live"
;;
esac
fi
# Set iso preparer
- LH_ISO_PREPARER="${LH_ISO_PREPARER:-live-build \$VERSION; http://packages.qa.debian.org/live-build}"
+ LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build \$VERSION; http://packages.qa.debian.org/live-build}"
# Set iso publisher
- LH_ISO_PUBLISHER="${LH_ISO_PUBLISHER:-Debian Live project; http://live.debian.net/; debian-live@lists.debian.org}"
+ LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Debian Live project; http://live.debian.net/; debian-live@lists.debian.org}"
# Setting iso volume
- if [ -z "${LH_ISO_VOLUME}" ]
+ if [ -z "${LB_ISO_VOLUME}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian)
- LH_ISO_VOLUME="Debian ${LH_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)"
+ LB_ISO_VOLUME="Debian ${LB_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)"
;;
debian-release)
- eval VERSION="$`echo RELEASE_${LH_DISTRIBUTION}`"
- LH_ISO_VOLUME="Debian ${VERSION} ${LH_ARCHITECTURE} live"
+ eval VERSION="$`echo RELEASE_${LB_DISTRIBUTION}`"
+ LB_ISO_VOLUME="Debian ${VERSION} ${LB_ARCHITECTURE} live"
;;
emdebian)
- LH_ISO_VOLUME="Emdebian ${LH_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)"
+ LB_ISO_VOLUME="Emdebian ${LB_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)"
;;
ubuntu)
- LH_ISO_VOLUME="Ubuntu ${LH_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)"
+ LB_ISO_VOLUME="Ubuntu ${LB_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)"
;;
esac
fi
# Setting memtest option
- LH_MEMTEST="${LH_MEMTEST:-memtest86+}"
+ LB_MEMTEST="${LB_MEMTEST:-memtest86+}"
# Setting win32-loader option
- if [ "${LH_MODE}" != "ubuntu" ]
+ if [ "${LB_MODE}" != "ubuntu" ]
then
- case "${LH_ARCHITECTURE}" in
+ case "${LB_ARCHITECTURE}" in
amd64|i386)
- if [ "${LH_DEBIAN_INSTALLER}" != "false" ]
+ if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
- LH_WIN32_LOADER="${LH_WIN32_LOADER:-true}"
+ LB_WIN32_LOADER="${LB_WIN32_LOADER:-true}"
else
- LH_WIN32_LOADER="${LH_WIN32_LOADER:-false}"
+ LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
fi
;;
*)
- LH_WIN32_LOADER="${LH_WIN32_LOADER:-false}"
+ LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
;;
esac
fi
# Setting netboot filesystem
- LH_NET_ROOT_FILESYSTEM="${LH_NET_ROOT_FILESYSTEM:-nfs}"
+ LB_NET_ROOT_FILESYSTEM="${LB_NET_ROOT_FILESYSTEM:-nfs}"
# Setting netboot server path
- if [ -z "${LH_NET_ROOT_PATH}" ]
+ if [ -z "${LB_NET_ROOT_PATH}" ]
then
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_NET_ROOT_PATH="/srv/debian-live"
+ LB_NET_ROOT_PATH="/srv/debian-live"
;;
emdebian)
- LH_NET_ROOT_PATH="/srv/emdebian-live"
+ LB_NET_ROOT_PATH="/srv/emdebian-live"
;;
ubuntu)
- LH_NET_ROOT_PATH="/srv/ubuntu-live"
+ LB_NET_ROOT_PATH="/srv/ubuntu-live"
;;
esac
fi
# Setting netboot server address
- LH_NET_ROOT_SERVER="${LH_NET_ROOT_SERVER:-192.168.1.1}"
+ LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER:-192.168.1.1}"
# Setting net cow filesystem
- LH_NET_COW_FILESYSTEM="${LH_NET_COW_FILESYSTEM:-nfs}"
+ LB_NET_COW_FILESYSTEM="${LB_NET_COW_FILESYSTEM:-nfs}"
# Setting net tarball
- LH_NET_TARBALL="${LH_NET_TARBALL:-gzip}"
+ LB_NET_TARBALL="${LB_NET_TARBALL:-gzip}"
# Setting syslinux configuration file
- # LH_SYSLINUX_CFG
+ # LB_SYSLINUX_CFG
# Setting syslinux splash
- # LH_SYSLINUX_SPLASH
+ # LB_SYSLINUX_SPLASH
- LH_SYSLINUX_TIMEOUT="${LH_SYSLINUX_TIMEOUT:-0}"
+ LB_SYSLINUX_TIMEOUT="${LB_SYSLINUX_TIMEOUT:-0}"
# Setting syslinux menu
- LH_SYSLINUX_MENU="${LH_SYSLINUX_MENU:-true}"
+ LB_SYSLINUX_MENU="${LB_SYSLINUX_MENU:-true}"
# Setting syslinux menu live entries
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
debian|debian-release)
- LH_SYSLINUX_MENU_LIVE_ENTRY="${LH_SYSLINUX_MENU_LIVE_ENTRY:-Live}"
- LH_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE="${LH_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE:-${LH_SYSLINUX_MENU_LIVE_ENTRY} (failsafe)}"
+ LB_SYSLINUX_MENU_LIVE_ENTRY="${LB_SYSLINUX_MENU_LIVE_ENTRY:-Live}"
+ LB_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE="${LB_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE:-${LB_SYSLINUX_MENU_LIVE_ENTRY} (failsafe)}"
;;
*)
- LH_SYSLINUX_MENU_LIVE_ENTRY="${LH_SYSLINUX_MENU_LIVE_ENTRY:-Start ${LH_ISO_APPLICATION}}"
- LH_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE="${LH_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE:-${LH_SYSLINUX_MENU_LIVE_ENTRY} (failsafe)}"
+ LB_SYSLINUX_MENU_LIVE_ENTRY="${LB_SYSLINUX_MENU_LIVE_ENTRY:-Start ${LB_ISO_APPLICATION}}"
+ LB_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE="${LB_SYSLINUX_MENU_LIVE_ENTRY_FAILSAFE:-${LB_SYSLINUX_MENU_LIVE_ENTRY} (failsafe)}"
;;
esac
# Settings memtest menu entry
- LH_SYSLINUX_MENU_MEMTEST_ENTRY="${LH_SYSLINUX_MENU_MEMTEST_ENTRY:-Memory test}"
+ LB_SYSLINUX_MENU_MEMTEST_ENTRY="${LB_SYSLINUX_MENU_MEMTEST_ENTRY:-Memory test}"
# Setting username
- case "${LH_MODE}" in
+ case "${LB_MODE}" in
ubuntu)
- LH_USERNAME="${LH_USERNAME:-ubuntu}"
+ LB_USERNAME="${LB_USERNAME:-ubuntu}"
;;
*)
- LH_USERNAME="${LH_USERNAME:-user}"
+ LB_USERNAME="${LB_USERNAME:-user}"
;;
esac
## config/source
# Setting source option
- LH_SOURCE="${LH_SOURCE:-false}"
+ LB_SOURCE="${LB_SOURCE:-false}"
# Setting image type
- LH_SOURCE_IMAGES="${LH_SOURCE_IMAGES:-tar}"
+ LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES:-tar}"
# Setting fakeroot/fakechroot
- LH_USE_FAKEROOT="${LH_USE_FAKEROOT:-false}"
+ LB_USE_FAKEROOT="${LB_USE_FAKEROOT:-false}"
}
Check_defaults ()
{
- if [ "${LH_CONFIG_VERSION}" ]
+ if [ "${LB_CONFIG_VERSION}" ]
then
# We're only checking when we're actually running the checks
# that's why the check for emptyness of the version;
- # however, as live-build always declares LH_CONFIG_VERSION
+ # however, as live-build always declares LB_CONFIG_VERSION
# internally, this is safe assumption (no cases where it's unset,
# except when bootstrapping the functions/defaults etc.).
- CURRENT_CONFIG_VERSION="$(echo ${LH_CONFIG_VERSION} | awk -F. '{ print $1 }')"
+ CURRENT_CONFIG_VERSION="$(echo ${LB_CONFIG_VERSION} | awk -F. '{ print $1 }')"
if [ ${CURRENT_CONFIG_VERSION} -ge 3 ]
then
@@ -1120,40 +1120,40 @@ Check_defaults ()
fi
fi
- if echo ${LH_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
+ if echo ${LB_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
then
# aptitude + stripped|minimal
- if [ "${LH_APT}" = "aptitude" ]
+ if [ "${LB_APT}" = "aptitude" ]
then
- Echo_warning "You selected LH_PACKAGES_LISTS='%s' and LH_APT='aptitude'" "${LH_PACKAGES_LIST}. This configuration is potentially unsafe, as aptitude is not used in the stripped/minimal package lists."
+ Echo_warning "You selected LB_PACKAGES_LISTS='%s' and LB_APT='aptitude'" "${LB_PACKAGES_LIST}. This configuration is potentially unsafe, as aptitude is not used in the stripped/minimal package lists."
fi
fi
- if [ "${LH_DEBIAN_INSTALLER}" != "false" ]
+ if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
# d-i true, no caching
- if ! echo ${LH_CACHE_STAGES} | grep -qs "bootstrap\b" || [ "${LH_CACHE}" != "true" ] || [ "${LH_CACHE_PACKAGES}" != "true" ]
+ if ! echo ${LB_CACHE_STAGES} | grep -qs "bootstrap\b" || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
then
- Echo_warning "You have selected values of LH_CACHE, LH_CACHE_PACKAGES, LH_CACHE_STAGES and LH_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached. This configuration is potentially unsafe as the bootstrap packages are re-used when integrating the Debian Installer."
+ Echo_warning "You have selected values of LB_CACHE, LB_CACHE_PACKAGES, LB_CACHE_STAGES and LB_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached. This configuration is potentially unsafe as the bootstrap packages are re-used when integrating the Debian Installer."
fi
fi
- if [ "${LH_BOOTLOADER}" = "syslinux" ]
+ if [ "${LB_BOOTLOADER}" = "syslinux" ]
then
# syslinux + fat
- case "${LH_BINARY_FILESYSTEM}" in
+ case "${LB_BINARY_FILESYSTEM}" in
fat*)
;;
*)
- Echo_warning "You have selected values of LH_BOOTLOADER and LH_BINARY_FILESYSTEM which are incompatible - syslinux only supports FAT filesystems."
+ Echo_warning "You have selected values of LB_BOOTLOADER and LB_BINARY_FILESYSTEM which are incompatible - syslinux only supports FAT filesystems."
;;
esac
fi
- case "${LH_BINARY_IMAGES}" in
+ case "${LB_BINARY_IMAGES}" in
usb*)
# grub or yaboot + usb
- case "${LH_BOOTLOADER}" in
+ case "${LB_BOOTLOADER}" in
grub|yaboot)
Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type."
exit 1
@@ -1162,31 +1162,31 @@ Check_defaults ()
;;
esac
- if [ "$(echo ${LH_ISO_APPLICATION} | wc -c)" -gt 128 ]
+ if [ "$(echo ${LB_ISO_APPLICATION} | wc -c)" -gt 128 ]
then
- Echo_warning "You have specified a value of LH_ISO_APPLICATION that is too long; the maximum length is 128 characters."
+ Echo_warning "You have specified a value of LB_ISO_APPLICATION that is too long; the maximum length is 128 characters."
fi
- if [ "$(echo ${LH_ISO_PREPARER} | wc -c)" -gt 128 ]
+ if [ "$(echo ${LB_ISO_PREPARER} | wc -c)" -gt 128 ]
then
- Echo_warning "You have specified a value of LH_ISO_PREPARER that is too long; the maximum length is 128 characters."
+ Echo_warning "You have specified a value of LB_ISO_PREPARER that is too long; the maximum length is 128 characters."
fi
- if [ "$(echo ${LH_ISO_PUBLISHER} | wc -c)" -gt 128 ]
+ if [ "$(echo ${LB_ISO_PUBLISHER} | wc -c)" -gt 128 ]
then
- Echo_warning "You have specified a value of LH_ISO_PUBLISHER that is too long; the maximum length is 128 characters."
+ Echo_warning "You have specified a value of LB_ISO_PUBLISHER that is too long; the maximum length is 128 characters."
fi
- if [ "$(eval "echo ${LH_ISO_VOLUME}" | wc -c)" -gt 32 ]
+ if [ "$(eval "echo ${LB_ISO_VOLUME}" | wc -c)" -gt 32 ]
then
- Echo_warning "You have specified a value of LH_ISO_VOLUME that is too long; the maximum length is 32 characters."
+ Echo_warning "You have specified a value of LB_ISO_VOLUME that is too long; the maximum length is 32 characters."
fi
- if echo ${LH_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
+ if echo ${LB_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
then
- if [ "${LH_BINARY_INDICES}" = "true" ]
+ if [ "${LB_BINARY_INDICES}" = "true" ]
then
- Echo_warning "You have selected hook to minimise image size but you are still including package indices with your value of LH_BINARY_INDICES."
+ Echo_warning "You have selected hook to minimise image size but you are still including package indices with your value of LB_BINARY_INDICES."
fi
fi
diff --git a/functions/echo.sh b/functions/echo.sh
index 0d8147ac2..555bc42bb 100755
--- a/functions/echo.sh
+++ b/functions/echo.sh
@@ -238,7 +238,7 @@ Echo_file ()
Echo_breakage ()
{
- case "${LH_DISTRIBUTION}" in
+ case "${LB_DISTRIBUTION}" in
sid|unstable)
Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration, a caching proxy or the sid distribution."
;;
diff --git a/functions/losetup.sh b/functions/losetup.sh
index cb9eeed43..fa6cd8373 100755
--- a/functions/losetup.sh
+++ b/functions/losetup.sh
@@ -14,9 +14,9 @@ Losetup ()
FILE="${2}"
PARTITION="${3:-1}"
- ${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
- FDISK_OUT="$(${LH_FDISK} -l -u ${DEVICE} 2>&1)"
- ${LH_ROOT_COMMAND} ${LH_LOSETUP} -d "${DEVICE}"
+ ${LB_ROOT_COMMAND} ${LB_LOSETUP} "${DEVICE}" "${FILE}"
+ FDISK_OUT="$(${LB_FDISK} -l -u ${DEVICE} 2>&1)"
+ ${LB_ROOT_COMMAND} ${LB_LOSETUP} -d "${DEVICE}"
LOOPDEVICE="$(echo ${DEVICE}p${PARTITION})"
@@ -24,14 +24,14 @@ Losetup ()
then
Echo_message "Mounting %s with offset 0" "${DEVICE}"
- ${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
+ ${LB_ROOT_COMMAND} ${LB_LOSETUP} "${DEVICE}" "${FILE}"
else
SECTORS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")"
OFFSET="$(expr ${SECTORS} '*' 512)"
Echo_message "Mounting %s with offset %s" "${DEVICE}" "${OFFSET}"
- ${LH_ROOT_COMMAND} ${LH_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}"
+ ${LB_ROOT_COMMAND} ${LB_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}"
fi
}
diff --git a/functions/packages.sh b/functions/packages.sh
index 8d7953230..20d53df61 100755
--- a/functions/packages.sh
+++ b/functions/packages.sh
@@ -17,7 +17,7 @@ Check_package ()
case "${INSTALL_STATUS}" in
1)
- _LH_PACKAGES="${_LH_PACKAGES} ${PACKAGE}"
+ _LB_PACKAGES="${_LB_PACKAGES} ${PACKAGE}"
;;
2)
@@ -29,15 +29,15 @@ Check_package ()
Install_package ()
{
- if [ -n "${_LH_PACKAGES}" ] && [ "${LH_BUILD_WITH_CHROOT}" != "false" ]
+ if [ -n "${_LB_PACKAGES}" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
then
- case "${LH_APT}" in
+ case "${LB_APT}" in
apt|apt-get)
- Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LH_PACKAGES}"
+ Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LB_PACKAGES}"
;;
aptitude)
- Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LH_PACKAGES}"
+ Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
;;
esac
fi
@@ -45,15 +45,15 @@ Install_package ()
Remove_package ()
{
- if [ -n "${_LH_PACKAGES}" ] && [ "${LH_BUILD_WITH_CHROOT}" != "false" ]
+ if [ -n "${_LB_PACKAGES}" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
then
- case "${LH_APT}" in
+ case "${LB_APT}" in
apt|apt-get)
- Chroot chroot "apt-get remove --purge ${APT_OPTIONS} ${_LH_PACKAGES}"
+ Chroot chroot "apt-get remove --purge ${APT_OPTIONS} ${_LB_PACKAGES}"
;;
aptitude)
- Chroot chroot "aptitude purge ${APTITUDE_OPTIONS} ${_LH_PACKAGES}"
+ Chroot chroot "aptitude purge ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
;;
esac
fi
@@ -69,7 +69,7 @@ Check_installed ()
FILE="${1}"
PACKAGE="${2}"
- case "${LH_BUILD_WITH_CHROOT}" in
+ case "${LB_BUILD_WITH_CHROOT}" in
true)
if Chroot chroot "dpkg-query -s ${PACKAGE}" 2> /dev/null | grep -qs "Status: install"
then
diff --git a/functions/packageslists.sh b/functions/packageslists.sh
index 6510d27a6..6095f3feb 100755
--- a/functions/packageslists.sh
+++ b/functions/packageslists.sh
@@ -10,89 +10,89 @@
Expand_packagelist ()
{
- _LH_EXPAND_QUEUE="$(basename "${1}")"
+ _LB_EXPAND_QUEUE="$(basename "${1}")"
shift
- while [ -n "${_LH_EXPAND_QUEUE}" ]
+ while [ -n "${_LB_EXPAND_QUEUE}" ]
do
- _LH_LIST_NAME="$(echo ${_LH_EXPAND_QUEUE} | cut -d" " -f1)"
- _LH_EXPAND_QUEUE="$(echo ${_LH_EXPAND_QUEUE} | cut -s -d" " -f2-)"
- _LH_LIST_LOCATION=""
- _LH_NESTED=0
- _LH_ENABLED=1
+ _LB_LIST_NAME="$(echo ${_LB_EXPAND_QUEUE} | cut -d" " -f1)"
+ _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} | cut -s -d" " -f2-)"
+ _LB_LIST_LOCATION=""
+ _LB_NESTED=0
+ _LB_ENABLED=1
- for _LH_SEARCH_PATH in ${@} "${LH_BASE:-/usr/share/live/build}/lists"
+ for _LB_SEARCH_PATH in ${@} "${LB_BASE:-/usr/share/live/build}/lists"
do
- if [ -e "${_LH_SEARCH_PATH}/${_LH_LIST_NAME}" ]
+ if [ -e "${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" ]
then
- _LH_LIST_LOCATION="${_LH_SEARCH_PATH}/${_LH_LIST_NAME}"
+ _LB_LIST_LOCATION="${_LB_SEARCH_PATH}/${_LB_LIST_NAME}"
break
fi
done
- if [ -z "${_LH_LIST_LOCATION}" ]
+ if [ -z "${_LB_LIST_LOCATION}" ]
then
- echo "W: Unknown package list '${_LH_LIST_NAME}'" >&2
+ echo "W: Unknown package list '${_LB_LIST_NAME}'" >&2
continue
fi
- while read _LH_LINE
+ while read _LB_LINE
do
- case "${_LH_LINE}" in
+ case "${_LB_LINE}" in
\#if\ *)
- if [ ${_LH_NESTED} -eq 1 ]
+ if [ ${_LB_NESTED} -eq 1 ]
then
echo "E: Nesting conditionals is not supported" >&2
exit 1
fi
- _LH_NESTED=1
+ _LB_NESTED=1
- _LH_NEEDLE="$(echo "${_LH_LINE}" | cut -d' ' -f3-)"
- _LH_HAYSTACK="$(eval "echo \$LH_$(echo "${_LH_LINE}" | cut -d' ' -f2)")"
+ _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
+ _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
- _LH_ENABLED=0
- for _LH_NEEDLE_PART in ${_LH_NEEDLE}
+ _LB_ENABLED=0
+ for _LB_NEEDLE_PART in ${_LB_NEEDLE}
do
- for _LH_HAYSTACK_PART in ${_LH_HAYSTACK}
+ for _LB_HAYSTACK_PART in ${_LB_HAYSTACK}
do
- if [ "${_LH_NEEDLE_PART}" = "${_LH_HAYSTACK_PART}" ]
+ if [ "${_LB_NEEDLE_PART}" = "${_LB_HAYSTACK_PART}" ]
then
- _LH_ENABLED=1
+ _LB_ENABLED=1
fi
done
done
;;
\#endif*)
- _LH_NESTED=0
- _LH_ENABLED=1
+ _LB_NESTED=0
+ _LB_ENABLED=1
;;
\#*)
- if [ ${_LH_ENABLED} -ne 1 ]
+ if [ ${_LB_ENABLED} -ne 1 ]
then
continue
fi
# Find includes
- _LH_INCLUDES="$(echo "${_LH_LINE}" | sed -n \
+ _LB_INCLUDES="$(echo "${_LB_LINE}" | sed -n \
-e 's|^#<include> \([^ ]*\)|\1|gp' \
-e 's|^#include <\([^ ]*\)>|\1|gp')"
# Add to queue
- _LH_EXPAND_QUEUE="$(echo ${_LH_EXPAND_QUEUE} ${_LH_INCLUDES} |
+ _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} ${_LB_INCLUDES} |
sed -e 's|[ ]*$||' -e 's|^[ ]*||')"
;;
*)
- if [ ${_LH_ENABLED} -eq 1 ]
+ if [ ${_LB_ENABLED} -eq 1 ]
then
- echo "${_LH_LINE}"
+ echo "${_LB_LINE}"
fi
;;
esac
- done < "${_LH_LIST_LOCATION}"
+ done < "${_LB_LIST_LOCATION}"
done
}
diff --git a/functions/templates.sh b/functions/templates.sh
index dd774c5c7..d365ccda2 100755
--- a/functions/templates.sh
+++ b/functions/templates.sh
@@ -15,11 +15,11 @@ Check_templates ()
if [ -d "config/templates/${PACKAGE}" ]
then
TEMPLATES="config/templates/${PACKAGE}"
- elif [ -d "${LH_TEMPLATES}/${PACKAGE}" ]
+ elif [ -d "${LB_TEMPLATES}/${PACKAGE}" ]
then
- TEMPLATES="${LH_TEMPLATES}/${PACKAGE}"
+ TEMPLATES="${LB_TEMPLATES}/${PACKAGE}"
else
- Echo_error "%s templates not accessible in %s nor config/templates" "${PACKAGE}" "${LH_TEMPLATES}"
+ Echo_error "%s templates not accessible in %s nor config/templates" "${PACKAGE}" "${LB_TEMPLATES}"
exit 1
fi
}
diff --git a/functions/wrapper.sh b/functions/wrapper.sh
index a856756d7..3b8a67232 100755
--- a/functions/wrapper.sh
+++ b/functions/wrapper.sh
@@ -10,7 +10,7 @@
Apt ()
{
- case "${LH_APT}" in
+ case "${LB_APT}" in
apt|apt-get)
Chroot chroot apt-get ${APT_OPTIONS} ${@}
;;