summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:09 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commit97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179 (patch)
treed7facbbbf53b1a5bc0fa92f671f5b1e29a7e3200 /functions
parent7c68e6ebca01f64501453fa53941ac77b9c2c335 (diff)
downloadvyos-live-build-97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179.tar.gz
vyos-live-build-97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179.zip
Adding live-helper 1.0~a10-1.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/chroot.sh2
-rwxr-xr-xfunctions/common.sh2
-rwxr-xr-xfunctions/defaults.sh93
-rwxr-xr-xfunctions/echo.sh2
4 files changed, 53 insertions, 46 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 77232a170..26ecec979 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -16,4 +16,6 @@ Chroot ()
# Executing commands in chroot
Echo_debug "Executing: ${COMMANDS}"
${LH_ROOT_COMMAND} chroot chroot /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LH_APT_FTPPROXY}" http_proxy="${LH_APT_HTTPPROXY}" DEBIAN_FRONTEND="${LH_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LH_DEBCONF_PRIORITY}" DEBCONF_NOWARNINGS="${LH_DEBCONF_NOWARNINGS}" ${COMMANDS}
+
+ return "${?}"
}
diff --git a/functions/common.sh b/functions/common.sh
index 88a883a1f..d97ce044d 100755
--- a/functions/common.sh
+++ b/functions/common.sh
@@ -10,4 +10,4 @@
set -e
PROGRAM="`basename ${0}`"
-VERSION="1.0~a9"
+VERSION="1.0~a10"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 0c923b60b..0cbbfeb90 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -61,9 +61,9 @@ Set_defaults ()
fi
# Setting apt indices
- if [ -z "${LH_APT_GENERIC}" ]
+ if [ -z "${LIVE_BINARY_INDICES}" ]
then
- LH_APT_GENERIC="enabled"
+ LIVE_BINARY_INDICES="enabled"
fi
# Setting apt pdiffs
@@ -189,7 +189,12 @@ Set_defaults ()
# Setting initramfs generator
if [ -z "${LH_INITRAMFS}" ]
then
- LH_INITRAMFS="casper"
+ if [ "${LIVE_DISTRIBUTION}" = "etch" ]
+ then
+ LH_INITRAMFS="casper"
+ else
+ LH_INITRAMFS="live-initramfs"
+ fi
fi
# Setting root directory
@@ -287,57 +292,57 @@ Set_defaults ()
fi
# Setting mirror to fetch packages from
- if [ -z "${LIVE_MIRROR_BUILD}" ]
+ if [ -z "${LIVE_MIRROR_BOOTSTRAP}" ]
then
case "${LH_MODE}" in
debian)
- LIVE_MIRROR_BUILD="http://ftp.debian.org/debian/"
+ LIVE_MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/"
;;
ubuntu)
- LIVE_MIRROR_BUILD="http://archive.ubuntu.com/ubuntu/"
+ LIVE_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/"
;;
esac
fi
# Setting security mirror to fetch packages from
- if [ -z "${LIVE_MIRROR_BUILD_SECURITY}" ]
+ if [ -z "${LIVE_MIRROR_BOOTSTRAP_SECURITY}" ]
then
case "${LH_MODE}" in
debian)
- LIVE_MIRROR_BUILD_SECURITY="http://security.debian.org/"
+ LIVE_MIRROR_BOOTSTRAP_SECURITY="http://security.debian.org/"
;;
ubuntu)
- LIVE_MIRROR_BUILD_SECURITY="http://security.ubuntu.org/ubuntu/"
+ LIVE_MIRROR_BOOTSTRAP_SECURITY="http://security.ubuntu.org/ubuntu/"
;;
esac
fi
# Setting mirror which ends up in the image
- if [ -z "${LIVE_MIRROR_IMAGE}" ]
+ if [ -z "${LIVE_MIRROR_BINARY}" ]
then
case "${LH_MODE}" in
debian)
- LIVE_MIRROR_IMAGE="http://ftp.debian.org/debian/"
+ LIVE_MIRROR_BINARY="http://ftp.debian.org/debian/"
;;
ubuntu)
- LIVE_MIRROR_IMAGE="http://archive.ubuntu.com/ubuntu/"
+ LIVE_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/"
;;
esac
fi
# Setting security mirror which ends up in the image
- if [ -z "${LIVE_MIRROR_IMAGE_SECURITY}" ]
+ if [ -z "${LIVE_MIRROR_BINARY_SECURITY}" ]
then
case "${LH_MODE}" in
debian)
- LIVE_MIRROR_IMAGE_SECURITY="http://security.debian.org/"
+ LIVE_MIRROR_BINARY_SECURITY="http://security.debian.org/"
;;
ubuntu)
- LIVE_MIRROR_IMAGE_SECURITY="http://security.ubuntu.com/ubuntu/"
+ LIVE_MIRROR_BINARY_SECURITY="http://security.ubuntu.com/ubuntu/"
;;
esac
fi
@@ -365,21 +370,21 @@ Set_defaults ()
fi
# Setting kernel flavour string
- if [ -z "${LIVE_KERNEL_FLAVOUR}" ]
+ if [ -z "${LIVE_LINUX_FLAVOURS}" ]
then
case "${LIVE_ARCHITECTURE}" in
alpha)
- LIVE_KERNEL_FLAVOUR="alpha-generic"
+ LIVE_LINUX_FLAVOURS="alpha-generic"
;;
amd64)
case "${LH_MODE}" in
debian)
- LIVE_KERNEL_FLAVOUR="amd64"
+ LIVE_LINUX_FLAVOURS="amd64"
;;
ubuntu)
- LIVE_KERNEL_FLAVOUR="amd64-generic"
+ LIVE_LINUX_FLAVOURS="amd64-generic"
;;
esac
;;
@@ -390,46 +395,46 @@ Set_defaults ()
;;
hppa)
- LIVE_KERNEL_FLAVOUR="parisc"
+ LIVE_LINUX_FLAVOURS="parisc"
;;
i386)
case "${LH_MODE}" in
debian)
- LIVE_KERNEL_FLAVOUR="486"
+ LIVE_LINUX_FLAVOURS="486"
;;
ubuntu)
- LIVE_KERNEL_FLAVOUR="386"
+ LIVE_LINUX_FLAVOURS="386"
;;
esac
;;
ia64)
- LIVE_KERNEL_FLAVOUR="itanium"
+ LIVE_LINUX_FLAVOURS="itanium"
;;
m68k)
- LIVE_KERNEL_FLAVOUR="E: You need to specify the linux kernel flavour manually on m68k."
+ LIVE_LINUX_FLAVOURS="E: You need to specify the linux kernel flavour manually on m68k."
exit 1
;;
powerpc)
- LIVE_KERNEL_FLAVOUR="powerpc"
+ LIVE_LINUX_FLAVOURS="powerpc"
;;
s390)
- LIVE_KERNEL_FLAVOUR="s390"
+ LIVE_LINUX_FLAVOURS="s390"
;;
sparc)
case "${LH_MODE}" in
debian)
- LIVE_KERNEL_FLAVOUR="sparc32"
+ LIVE_LINUX_FLAVOURS="sparc32"
;;
ubuntu)
- LIVE_KERNEL_FLAVOUR="sparc64"
+ LIVE_LINUX_FLAVOURS="sparc64"
;;
esac
;;
@@ -441,21 +446,21 @@ Set_defaults ()
fi
# Set kernel packages
- if [ -z "${LIVE_KERNEL_PACKAGES}" ]
+ if [ -z "${LIVE_LINUX_PACKAGES}" ]
then
case "${LH_MODE}" in
debian)
- LIVE_KERNEL_PACKAGES="linux-image-2.6 squashfs-modules-2.6 unionfs-modules-2.6"
+ LIVE_LINUX_PACKAGES="linux-image-2.6 squashfs-modules-2.6 unionfs-modules-2.6"
;;
ubuntu)
- LIVE_KERNEL_PACKAGES="linux-image"
+ LIVE_LINUX_PACKAGES="linux-image"
;;
esac
if [ -n "${LIVE_ENCRYPTION}" ]
then
- LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES} loop-aes-modules-2.6"
+ LIVE_LINUX_PACKAGES="${LIVE_LINUX_PACKAGES} loop-aes-modules-2.6"
fi
fi
@@ -554,21 +559,21 @@ Set_defaults ()
fi
# Setting image type
- if [ -z "${LIVE_BINARY_IMAGE}" ]
+ if [ -z "${LIVE_BINARY_IMAGES}" ]
then
- LIVE_BINARY_IMAGE="iso"
+ LIVE_BINARY_IMAGES="iso"
fi
# Setting image type
- if [ -z "${LIVE_SOURCE_IMAGE}" ]
+ if [ -z "${LIVE_SOURCE_IMAGES}" ]
then
- LIVE_SOURCE_IMAGE="generic"
+ LIVE_SOURCE_IMAGES="generic"
fi
- # Setting filesystem
- if [ -z "${LIVE_FILESYSTEM}" ]
+ # Setting chroot filesystem
+ if [ -z "${LIVE_CHROOT_FILESYSTEM}" ]
then
- LIVE_FILESYSTEM="squashfs"
+ LIVE_CHROOT_FILESYSTEM="squashfs"
fi
# Setting memtest option
@@ -598,21 +603,21 @@ Set_defaults ()
fi
# Setting netboot server address
- if [ -z "${LIVE_SERVER_ADDRESS}" ]
+ if [ -z "${LIVE_NET_SERVER}" ]
then
- LIVE_SERVER_ADDRESS="192.168.1.1"
+ LIVE_NET_SERVER="192.168.1.1"
fi
# Setting netboot server path
- if [ -z "${LIVE_SERVER_PATH}" ]
+ if [ -z "${LIVE_NET_PATH}" ]
then
case "${LH_MODE}" in
debian)
- LIVE_SERVER_PATH="/srv/debian-live"
+ LIVE_NET_PATH="/srv/debian-live"
;;
ubuntu)
- LIVE_SERVER_PATH="/srv/ubuntu-live"
+ LIVE_NET_PATH="/srv/ubuntu-live"
;;
esac
fi
diff --git a/functions/echo.sh b/functions/echo.sh
index f28879c61..f30438149 100755
--- a/functions/echo.sh
+++ b/functions/echo.sh
@@ -23,7 +23,7 @@ Echo_error ()
{
STRING="${1}"
- echo "E: ${STRING}"
+ echo "E: ${STRING}" >&2
}
Echo_message ()