summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:10 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commitd1ee66e44c8272bb7a0053a456a3d8b0bd152268 (patch)
tree9e6722124d18f9358999b0da840f27857f97fede /functions
parent86726af9f5e7873d6cdbbe108fae1c41b1b67db0 (diff)
downloadlive-build-d1ee66e44c8272bb7a0053a456a3d8b0bd152268.zip
live-build-d1ee66e44c8272bb7a0053a456a3d8b0bd152268.tar.gz
Adding live-helper 1.0~a12-1.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/chroot.sh2
-rwxr-xr-xfunctions/common.sh2
-rwxr-xr-xfunctions/defaults.sh224
3 files changed, 128 insertions, 100 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 26ecec9..4b9e850 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -15,7 +15,7 @@ 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}
+ ${LH_ROOT_COMMAND} 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_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 c4c361d..604d15a 100755
--- a/functions/common.sh
+++ b/functions/common.sh
@@ -10,4 +10,4 @@
set -e
PROGRAM="`basename ${0}`"
-VERSION="1.0~a11"
+VERSION="1.0~a12"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 0cbbfeb..ccba6f8 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -60,12 +60,6 @@ Set_defaults ()
fi
fi
- # Setting apt indices
- if [ -z "${LIVE_BINARY_INDICES}" ]
- then
- LIVE_BINARY_INDICES="enabled"
- fi
-
# Setting apt pdiffs
if [ -z "${LH_APT_PDIFFS}" ]
then
@@ -102,17 +96,14 @@ Set_defaults ()
;;
ubuntu)
- if [ -x "/usr/sbin/debootstrap" ]
+ if [ -x "/usr/bin/cdebootstrap" ] && [ -d /usr/share/cdebootstrap/generic-ubuntu ]
then
- if [ -f /usr/lib/debootstrap/scripts/feisty ]
- then
- LH_BOOTSTRAP="debootstrap"
- else
- echo "E: Your version of debootstrap does not support ubuntu."
- exit 1
- fi
+ LH_BOOTSTRAP="cdebootstrap"
+ elif [ -x "/usr/sbin/debootstrap" ] && [ -f /usr/lib/debootstrap/scripts/feisty ]
+ then
+ LH_BOOTSTRAP="debootstrap"
else
- echo "E: You need to install debootstrap from Ubuntu in order to bootstrap ubuntu."
+ echo "E: Your version of debootstrap or cdebootstrap is outdated and does not support ubuntu."
exit 1
fi
;;
@@ -141,14 +132,14 @@ Set_defaults ()
LH_DEBCONF_FRONTEND="noninteractive"
fi
- if [ -z "${LH_DEBCONF_PRIORITY}" ]
+ if [ -z "${LH_DEBCONF_NOWARNINGS}" ]
then
- LH_DEBCONF_PRIORITY="critical"
+ LH_DEBCONF_NOWARNINGS="yes"
fi
- if [ -z "${LH_DEBCONF_NOWARNINGS}" ]
+ if [ -z "${LH_DEBCONF_PRIORITY}" ]
then
- LH_DEBCONF_NOWARNINGS="yes"
+ LH_DEBCONF_PRIORITY="critical"
fi
# Setting genisoimage
@@ -165,10 +156,21 @@ Set_defaults ()
esac
fi
+ # Setting initramfs hook
+ if [ -z "${LH_INITRAMFS}" ]
+ then
+ if [ "${LIVE_DISTRIBUTION}" = "etch" ]
+ then
+ LH_INITRAMFS="casper"
+ else
+ LH_INITRAMFS="live-initramfs"
+ fi
+ fi
+
# Setting losetup
if [ -z "${LH_LOSETUP}" ] || [ ! -x "${LH_LOSETUP}" ]
then
- # Check for loop-aes-utils divertion
+ # Workaround for loop-aes-utils divertion
if [ -x /sbin/losetup.orig ]
then
LH_LOSETUP="losetup.orig"
@@ -180,21 +182,17 @@ Set_defaults ()
fi
fi
- # Setting tasksel
- if [ -z "${LH_TASKSEL}" ]
+ # If we are root, disable root command
+ if [ "`id -u`" = "0" ]
then
- LH_TASKSEL="aptitude"
+ # FIXME: this is disabled until considered save
+ LIVE_ROOT_COMMAND=""
fi
- # Setting initramfs generator
- if [ -z "${LH_INITRAMFS}" ]
+ # Setting tasksel
+ if [ -z "${LH_TASKSEL}" ]
then
- if [ "${LIVE_DISTRIBUTION}" = "etch" ]
- then
- LH_INITRAMFS="casper"
- else
- LH_INITRAMFS="live-initramfs"
- fi
+ LH_TASKSEL="aptitude"
fi
# Setting root directory
@@ -249,12 +247,6 @@ Set_defaults ()
LH_VERBOSE="disabled"
fi
- # If we are root, disable root command
- if [ "`id -u`" = "0" ]
- then
- LIVE_ROOT_COMMAND=""
- fi
-
## config/bootstrap
# Setting architecture value
@@ -264,7 +256,8 @@ Set_defaults ()
then
LIVE_ARCHITECTURE="`dpkg --print-architecture`"
else
- echo "E: Can't process file /usr/bin/dpkg (FIXME)"
+ echo "W: Can't process file /usr/bin/dpkg, setting architecture to i386"
+ LIVE_ARCHITECTURE="i386"
fi
fi
@@ -363,13 +356,27 @@ Set_defaults ()
## config/chroot
+ # Setting chroot filesystem
+ if [ -z "${LIVE_CHROOT_FILESYSTEM}" ]
+ then
+ LIVE_CHROOT_FILESYSTEM="squashfs"
+ fi
+
+ # LIVE_HOOKS
+
# Setting interactive shell/X11/Xnest
if [ -z "${LIVE_INTERACTIVE}" ]
then
LIVE_INTERACTIVE="disabled"
fi
- # Setting kernel flavour string
+ # Setting keyring packages
+ # LIVE_KEYRING_PACKAGES
+
+ # Setting language string
+ # LIVE_LANGUAGE
+
+ # Setting linux flavour string
if [ -z "${LIVE_LINUX_FLAVOURS}" ]
then
case "${LIVE_ARCHITECTURE}" in
@@ -431,6 +438,7 @@ Set_defaults ()
case "${LH_MODE}" in
debian)
LIVE_LINUX_FLAVOURS="sparc32"
+ # FIXME: needs update after etch
;;
ubuntu)
@@ -445,7 +453,7 @@ Set_defaults ()
esac
fi
- # Set kernel packages
+ # Set linux packages
if [ -z "${LIVE_LINUX_PACKAGES}" ]
then
case "${LH_MODE}" in
@@ -464,15 +472,6 @@ Set_defaults ()
fi
fi
- # Setting keyring packages
- # LIVE_KEYRING_PACKAGES
-
- # Setting language string
- # LIVE_LANGUAGE
-
- # Setting tasks
- # LIVE_TASKS
-
# Setting packages string
# LIVE_PACKAGES
@@ -510,7 +509,8 @@ Set_defaults ()
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/ //g'`"
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/ //g'`"
- # LIVE_HOOKS
+ # Setting tasks
+ # LIVE_TASKS
# Setting security updates option
if [ -z "${LIVE_SECURITY}" ]
@@ -530,20 +530,49 @@ Set_defaults ()
LIVE_SYSVINIT="disabled"
fi
- ## config/image
+ ## config/binary
+
+ # Setting image type
+ if [ -z "${LIVE_BINARY_IMAGES}" ]
+ then
+ LIVE_BINARY_IMAGES="iso"
+ fi
+
+ # Setting apt indices
+ if [ -z "${LIVE_BINARY_INDICES}" ]
+ then
+ LIVE_BINARY_INDICES="enabled"
+ fi
# Setting boot parameters
# LIVE_BOOTAPPEND
- # Setting encryption
- # LIVE_ENCRYPTION
+ # Setting bootloader
+ if [ -z "${LIVE_BOOTLOADER}" ]
+ then
+ case "${LIVE_ARCHITECTURE}" in
+ amd64|i386)
+ LIVE_BOOTLOADER="syslinux"
+ ;;
- # Setting username
- if [ -z "${LIVE_USERNAME}" ]
+ powerpc)
+ LIVE_BOOTLOADER="yaboot"
+ ;;
+ esac
+ fi
+
+ # Setting debian-installer option
+ if [ -z "${LIVE_DEBIAN_INSTALLER}" ]
then
- LIVE_USERNAME="user"
+ LIVE_DEBIAN_INSTALLER="disabled"
fi
+ # Setting encryption
+ # LIVE_ENCRYPTION
+
+ # Setting grub splash
+ # LIVE_GRUB_SPLASH
+
# Setting hostname
if [ -z "${LIVE_HOSTNAME}" ]
then
@@ -558,34 +587,30 @@ Set_defaults ()
esac
fi
- # Setting image type
- if [ -z "${LIVE_BINARY_IMAGES}" ]
+ # Setting iso author
+ if [ -z "${LIVE_ISO_APPLICATION}" ]
then
- LIVE_BINARY_IMAGES="iso"
- fi
+ case "${LH_MODE}" in
+ debian)
+ LIVE_ISO_APPLICATION="Debian Live"
+ ;;
- # Setting image type
- if [ -z "${LIVE_SOURCE_IMAGES}" ]
- then
- LIVE_SOURCE_IMAGES="generic"
+ ubuntu)
+ LIVE_ISO_APPLICATION="Ubuntu Live"
+ ;;
+ esac
fi
- # Setting chroot filesystem
- if [ -z "${LIVE_CHROOT_FILESYSTEM}" ]
+ # Set iso preparer
+ if [ -z "${LIVE_ISO_PREPARER}" ]
then
- LIVE_CHROOT_FILESYSTEM="squashfs"
+ LIVE_ISO_PREPARER="live-helper \${VERSION}; http://packages.qa.debian.org/live-helper"
fi
- # Setting memtest option
- if [ -z "${LIVE_MEMTEST}" ]
+ # Set iso publisher
+ if [ -z "${LIVE_ISO_PUBLISHER}" ]
then
- LIVE_MEMTEST="memtest86+"
- fi
-
- # Setting debian-installer option
- if [ -z "${LIVE_DEBIAN_INSTALLER}" ]
- then
- LIVE_DEBIAN_INSTALLER="disabled"
+ LIVE_ISO_PUBLISHER="Debian Live project; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org"
fi
# Setting iso volume
@@ -593,19 +618,19 @@ Set_defaults ()
then
case "${LH_MODE}" in
debian)
- LIVE_ISO_VOLUME="Debian Live \`date +%Y%m%d\`"
+ LIVE_ISO_VOLUME="Debian Live \`date +%Y%m%d-%H:%M\`"
;;
ubuntu)
- LIVE_ISO_VOLUME="Ubuntu Live \`date +%Y%m%d\`"
+ LIVE_ISO_VOLUME="Ubuntu Live \`date +%Y%m%d-%H:%M\`"
;;
esac
fi
- # Setting netboot server address
- if [ -z "${LIVE_NET_SERVER}" ]
+ # Setting memtest option
+ if [ -z "${LIVE_MEMTEST}" ]
then
- LIVE_NET_SERVER="192.168.1.1"
+ LIVE_MEMTEST="memtest86+"
fi
# Setting netboot server path
@@ -622,29 +647,32 @@ Set_defaults ()
esac
fi
+ # Setting netboot server address
+ if [ -z "${LIVE_NET_SERVER}" ]
+ then
+ LIVE_NET_SERVER="192.168.1.1"
+ fi
+
+ # Setting syslinux splash
+ # LIVE_SYSLINUX_SPLASH
+
+ # Setting username
+ if [ -z "${LIVE_USERNAME}" ]
+ then
+ LIVE_USERNAME="user"
+ fi
+
+ ## config/source
+
# Setting source option
if [ -z "${LIVE_SOURCE}" ]
then
LIVE_SOURCE="disabled"
fi
- # Setting grub
- if [ -z "${LIVE_BOOTLOADER}" ]
+ # Setting image type
+ if [ -z "${LIVE_SOURCE_IMAGES}" ]
then
- case "${LIVE_ARCHITECTURE}" in
- i386)
- LIVE_BOOTLOADER="syslinux"
- ;;
-
- powerpc)
- LIVE_BOOTLOADER="yaboot"
- ;;
- esac
+ LIVE_SOURCE_IMAGES="generic"
fi
-
- # Setting grub splash
- # LIVE_GRUB_SPLASH
-
- # Setting syslinux splash
- # LIVE_SYSLINUX_SPLASH
}