2007-09-23 08:04:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# defaults.sh - handle default values
|
2007-09-23 08:04:48 +00:00
|
|
|
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
|
|
|
|
#
|
|
|
|
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
|
|
# This is free software, and you are welcome to redistribute it
|
|
|
|
# under certain conditions; see COPYING for details.
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
Set_defaults ()
|
|
|
|
{
|
|
|
|
## config/common
|
|
|
|
|
2007-09-23 08:04:49 +00:00
|
|
|
# Setting mode
|
|
|
|
if [ -z "${LH_MODE}" ]
|
|
|
|
then
|
2007-09-23 08:05:11 +00:00
|
|
|
if [ -x /usr/bin/lsb_release ]
|
2007-09-23 08:04:50 +00:00
|
|
|
then
|
|
|
|
case "`lsb_release --short --id`" in
|
|
|
|
Debian)
|
|
|
|
LH_MODE="debian"
|
|
|
|
;;
|
|
|
|
|
|
|
|
Ubuntu)
|
|
|
|
LH_MODE="ubuntu"
|
|
|
|
;;
|
2007-09-23 08:05:11 +00:00
|
|
|
|
|
|
|
*)
|
|
|
|
Echo_verbose "Unexpected output from lsb_release"
|
|
|
|
Echo_verbose "Setting mode to debian."
|
|
|
|
LH_MODE="debian"
|
|
|
|
;;
|
2007-09-23 08:04:50 +00:00
|
|
|
esac
|
|
|
|
else
|
|
|
|
LH_MODE="debian"
|
|
|
|
fi
|
2007-09-23 08:04:49 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:13 +00:00
|
|
|
# Setting distribution name
|
2007-09-23 08:05:11 +00:00
|
|
|
if [ -z "${LIVE_DISTRIBUTION}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:05:11 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
LIVE_DISTRIBUTION="etch"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
|
|
|
LIVE_DISTRIBUTION="feisty"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:11 +00:00
|
|
|
# Setting package manager
|
|
|
|
LH_APT="${LH_APT:-aptitude}"
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting apt ftp proxy
|
|
|
|
if [ -z "${LH_APT_FTPPROXY}" ] && [ -n "${ftp_proxy}" ]
|
|
|
|
then
|
|
|
|
LH_APT_FTPPROXY="${ftp_proxy}"
|
|
|
|
else
|
|
|
|
if [ -n "${LH_APT_FTPPROXY}" ] && [ "${LH_APT_FTPRPOXY}" != "${ftp_proxy}" ]
|
|
|
|
then
|
|
|
|
ftp_proxy="${LH_APT_FTPRPOXY}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Setting apt http proxy
|
|
|
|
if [ -z "${LH_APT_HTTPPROXY}" ] && [ -n "${http_proxy}" ]
|
|
|
|
then
|
|
|
|
LH_APT_HTTPPROXY="${http_proxy}"
|
|
|
|
else
|
|
|
|
if [ -n "${LH_APT_HTTPPROXY}" ] && [ "${LH_APT_HTTPRPOXY}" != "${http_proxy}" ]
|
|
|
|
then
|
|
|
|
http_proxy="${LH_APT_HTTPPROXY}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Setting apt pdiffs
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_APT_PDIFFS="${LH_APT_PDIFFS:-enabled}"
|
|
|
|
|
|
|
|
# Setting apt pipeline
|
|
|
|
# LH_APT_PIPELINE
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
# Setting apt recommends
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_APT_RECOMMENDS="${LH_APT_RECOMMENDS:-enabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting apt secure
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_APT_SECURE="${LH_APT_SECURE:-enabled}"
|
2007-09-23 08:04:48 +00:00
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting bootstrap program
|
2007-09-23 08:05:13 +00:00
|
|
|
if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "`which ${LH_BOOTSTRAP}`" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
if [ -x "/usr/bin/cdebootstrap" ]
|
|
|
|
then
|
|
|
|
LH_BOOTSTRAP="cdebootstrap"
|
|
|
|
elif [ -x "/usr/sbin/debootstrap" ]
|
|
|
|
then
|
|
|
|
LH_BOOTSTRAP="debootstrap"
|
|
|
|
else
|
|
|
|
echo "E: Can't process file /usr/bin/cdebootstrap or /usr/sbin/debootstrap (FIXME)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:10 +00:00
|
|
|
if [ -x "/usr/bin/cdebootstrap" ] && [ -d /usr/share/cdebootstrap/generic-ubuntu ]
|
2007-09-23 08:04:49 +00:00
|
|
|
then
|
2007-09-23 08:05:10 +00:00
|
|
|
LH_BOOTSTRAP="cdebootstrap"
|
|
|
|
elif [ -x "/usr/sbin/debootstrap" ] && [ -f /usr/lib/debootstrap/scripts/feisty ]
|
|
|
|
then
|
|
|
|
LH_BOOTSTRAP="debootstrap"
|
2007-09-23 08:04:49 +00:00
|
|
|
else
|
2007-09-23 08:05:10 +00:00
|
|
|
echo "E: Your version of debootstrap or cdebootstrap is outdated and does not support ubuntu."
|
2007-09-23 08:04:49 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Setting cache option
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_CACHE_INDICES="${LH_CACHE_INDICES:-disabled}"
|
|
|
|
LH_CACHE_PACKAGES="${LH_CACHE_PACKAGES:-enabled}"
|
|
|
|
LH_CACHE_STAGES="${LH_CACHE_STAGES:-bootstrap}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
# Setting debconf frontend
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_DEBCONF_FRONTEND="${LH_DEBCONF_FRONTEND:-noninteractive}"
|
|
|
|
LH_DEBCONF_NOWARNINGS="${LH_DEBCONF_NOWARNINGS:-yes}"
|
|
|
|
LH_DEBCONF_PRIORITY="${LH_DEBCONF_PRIORITY:-critical}"
|
2007-09-23 08:04:50 +00:00
|
|
|
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LH_DEBCONF_NOWARNINGS}" in
|
|
|
|
enabled)
|
|
|
|
LH_DEBCONF_NOWARNINGS="yes"
|
|
|
|
;;
|
|
|
|
|
|
|
|
disabled)
|
|
|
|
LH_DEBCONF_NOWARNINGS="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting genisoimage
|
2007-09-23 08:04:48 +00:00
|
|
|
if [ -z "${LH_GENISOIMAGE}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:50 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
LH_GENISOIMAGE="genisoimage"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
|
|
|
LH_GENISOIMAGE="mkisofs"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting initramfs hook
|
|
|
|
if [ -z "${LH_INITRAMFS}" ]
|
|
|
|
then
|
|
|
|
if [ "${LIVE_DISTRIBUTION}" = "etch" ]
|
|
|
|
then
|
|
|
|
LH_INITRAMFS="casper"
|
|
|
|
else
|
|
|
|
LH_INITRAMFS="live-initramfs"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:47 +00:00
|
|
|
# Setting losetup
|
|
|
|
if [ -z "${LH_LOSETUP}" ] || [ ! -x "${LH_LOSETUP}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:05:10 +00:00
|
|
|
# Workaround for loop-aes-utils divertion
|
2007-09-23 08:04:47 +00:00
|
|
|
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
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
if [ "`id -u`" = "0" ]
|
2007-09-23 08:04:51 +00:00
|
|
|
then
|
2007-09-23 08:05:11 +00:00
|
|
|
# If we are root, disable root command
|
2007-09-23 08:05:10 +00:00
|
|
|
LIVE_ROOT_COMMAND=""
|
2007-09-23 08:05:11 +00:00
|
|
|
else
|
|
|
|
if [ -x /usr/bin/sudo ]
|
|
|
|
then
|
|
|
|
# FIXME: this is disabled until considered safe
|
|
|
|
#LIVE_ROOT_COMMAND="sudo"
|
|
|
|
LIVE_ROOT_COMMAND=""
|
|
|
|
fi
|
2007-09-23 08:04:51 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting tasksel
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_TASKSEL="${LH_TASKSEL:-aptitude}"
|
2007-09-23 08:04:52 +00:00
|
|
|
|
2007-09-23 08:04:47 +00:00
|
|
|
# Setting root directory
|
|
|
|
if [ -z "${LIVE_ROOT}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
LIVE_ROOT="debian-live"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
|
|
|
LIVE_ROOT="ubuntu-live"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:52 +00:00
|
|
|
# Setting includes
|
|
|
|
if [ -z "${LIVE_INCLUDES}" ]
|
|
|
|
then
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_INCLUDES="${LH_BASE:-/usr/share/live-helper}/includes"
|
2007-09-23 08:04:52 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Setting templates
|
|
|
|
if [ -z "${LIVE_TEMPLATES}" ]
|
|
|
|
then
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_TEMPLATES="${LH_BASE:-/usr/share/live-helper}/templates"
|
2007-09-23 08:04:52 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:49 +00:00
|
|
|
# Setting live helper options
|
2007-09-23 08:05:11 +00:00
|
|
|
LH_BREAKPOINTS="${LH_BREAKPOINTS:-disabled}"
|
|
|
|
LH_DEBUG="${LH_DEBUG:-disabled}"
|
|
|
|
LH_FORCE="${LH_FORCE:-disabled}"
|
|
|
|
LH_QUIET="${LH_QUIET:-disabled}"
|
|
|
|
LH_VERBOSE="${LH_VERBOSE:-disabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
## config/bootstrap
|
|
|
|
|
2007-09-23 08:04:47 +00:00
|
|
|
# Setting architecture value
|
2007-09-23 08:04:46 +00:00
|
|
|
if [ -z "${LIVE_ARCHITECTURE}" ]
|
|
|
|
then
|
|
|
|
if [ -x "/usr/bin/dpkg" ]
|
|
|
|
then
|
|
|
|
LIVE_ARCHITECTURE="`dpkg --print-architecture`"
|
|
|
|
else
|
2007-09-23 08:05:10 +00:00
|
|
|
echo "W: Can't process file /usr/bin/dpkg, setting architecture to i386"
|
|
|
|
LIVE_ARCHITECTURE="i386"
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:47 +00:00
|
|
|
# Setting distribution configuration value
|
2007-09-23 08:04:49 +00:00
|
|
|
# LIVE_BOOTSTRAP_CONFIG
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:04:47 +00:00
|
|
|
# Setting flavour value
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_BOOTSTRAP_FLAVOUR="${LIVE_BOOTSTRAP_FLAVOUR:-standard}"
|
|
|
|
|
|
|
|
# Setting boostrap keyring
|
|
|
|
# LIVE_BOOTSTRAP_KEYRING
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting mirror to fetch packages from
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_MIRROR_BOOTSTRAP}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386|powerpc|sparc)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
hppa|ia64)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP="http://ports.ubuntu.com/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
Echo_error "There is no port of Ubuntu available for your architecture."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting security mirror to fetch packages from
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_MIRROR_BOOTSTRAP_SECURITY}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_MIRROR_BOOTSTRAP_SECURITY="http://security.debian.org/"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386|powerpc|sparc)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP_SECURITY="http://archive.ubuntu.com/ubuntu/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
hppa|ia64)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP_SECURITY="http://ports.ubuntu.com/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
LIVE_MIRROR_BOOTSTRAP_SECURITY="none"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting mirror which ends up in the image
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_MIRROR_BINARY}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386)
|
|
|
|
LIVE_MIRROR_BINARY="http://ftp.debian.org/debian/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
LIVE_MIRROR_BINARY="http://ftp.de.debian.org/debian/"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386|powerpc|sparc)
|
|
|
|
LIVE_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
hppa|ia64)
|
|
|
|
LIVE_MIRROR_BINARY="http://ports.ubuntu.com/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
Echo_error "There is no port of Ubuntu available for your architecture."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting security mirror which ends up in the image
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_MIRROR_BINARY_SECURITY}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_MIRROR_BINARY_SECURITY="http://security.debian.org/"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:14 +00:00
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386|powerpc|sparc)
|
|
|
|
LIVE_MIRROR_BINARY_SECURITY="http://security.ubuntu.com/ubuntu/"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
LIVE_MIRROR_BINARY_SECURITY="none"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:47 +00:00
|
|
|
# Setting sections value
|
2007-09-23 08:04:46 +00:00
|
|
|
if [ -z "${LIVE_SECTIONS}" ]
|
|
|
|
then
|
2007-09-23 08:04:51 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
LIVE_SECTIONS="main"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
|
|
|
LIVE_SECTIONS="main restricted"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
## config/chroot
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting chroot filesystem
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_CHROOT_FILESYSTEM="${LIVE_CHROOT_FILESYSTEM:-squashfs}"
|
2007-09-23 08:05:10 +00:00
|
|
|
|
2007-09-23 08:05:13 +00:00
|
|
|
# Setting union filesystem
|
|
|
|
LIVE_UNION_FILESYSTEM="${LIVE_UNION_FILESYSTEM:-unionfs}"
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# LIVE_HOOKS
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting interactive shell/X11/Xnest
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_INTERACTIVE="${LIVE_INTERACTIVE:-disabled}"
|
2007-09-23 08:04:48 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting keyring packages
|
|
|
|
# LIVE_KEYRING_PACKAGES
|
|
|
|
|
|
|
|
# Setting language string
|
|
|
|
# LIVE_LANGUAGE
|
|
|
|
|
|
|
|
# Setting linux flavour string
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_LINUX_FLAVOURS}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
alpha)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="alpha-generic"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
amd64)
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="amd64"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="amd64-generic"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
arm)
|
2007-09-23 08:05:13 +00:00
|
|
|
Echo_error "You need to specify the linux kernel flavour manually on arm (FIXME)."
|
2007-09-23 08:04:46 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
|
|
|
|
hppa)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="parisc"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
i386)
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="486"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="386"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ia64)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="itanium"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
m68k)
|
2007-09-23 08:05:13 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="You need to specify the linux kernel flavour manually on m68k."
|
2007-09-23 08:04:46 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
|
|
|
|
powerpc)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="powerpc"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
s390)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="s390"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
sparc)
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="sparc32"
|
2007-09-23 08:05:10 +00:00
|
|
|
# FIXME: needs update after etch
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_FLAVOURS="sparc64"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2007-09-23 08:05:13 +00:00
|
|
|
Echo_error "Architecture notyet supported (FIXME)"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Set linux packages
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_LINUX_PACKAGES}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:13 +00:00
|
|
|
LIVE_LINUX_PACKAGES="linux-image-2.6 ${LIVE_UNION_FILESYSTEM}-modules-2.6"
|
2007-09-23 08:05:12 +00:00
|
|
|
|
|
|
|
if [ "${LIVE_CHROOT_FILESYSTEM}" = "squashfs" ]
|
|
|
|
then
|
|
|
|
LIVE_LINUX_PACKAGES="${LIVE_LINUX_PACKAGES} squashfs-modules-2.6"
|
|
|
|
fi
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_PACKAGES="linux-image"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
if [ -n "${LIVE_ENCRYPTION}" ]
|
|
|
|
then
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_LINUX_PACKAGES="${LIVE_LINUX_PACKAGES} loop-aes-modules-2.6"
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Setting packages string
|
|
|
|
# LIVE_PACKAGES
|
|
|
|
|
|
|
|
# Setting packages list string
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_PACKAGES_LISTS="${LIVE_PACKAGES_LISTS:-standard}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:11 +00:00
|
|
|
# Setting package preseed
|
|
|
|
# LIVE_PRESEED
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting tasks string
|
2007-09-23 08:04:48 +00:00
|
|
|
for LIST in ${LIVE_PACKAGES_LISTS}
|
2007-09-23 08:04:46 +00:00
|
|
|
do
|
|
|
|
case "${LIST}" in
|
2007-09-23 08:04:50 +00:00
|
|
|
mini|minimal)
|
|
|
|
LH_APT="apt-get"
|
|
|
|
;;
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
gnome-desktop)
|
2007-09-23 08:04:48 +00:00
|
|
|
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/gnome-desktop//'` standard-x11"
|
2007-09-23 08:04:50 +00:00
|
|
|
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//'` standard laptop gnome-desktop desktop"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
kde-desktop)
|
2007-09-23 08:04:48 +00:00
|
|
|
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/kde-desktop//'` standard-x11"
|
2007-09-23 08:04:50 +00:00
|
|
|
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//'` standard laptop kde-desktop desktop"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
xfce-desktop)
|
2007-09-23 08:04:48 +00:00
|
|
|
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/xfce-desktop//'` standard-x11"
|
2007-09-23 08:04:50 +00:00
|
|
|
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//'` standard laptop xfce-desktop desktop"
|
2007-09-23 08:04:46 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/ //g'`"
|
|
|
|
LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/ //g'`"
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting tasks
|
|
|
|
# LIVE_TASKS
|
2007-09-23 08:04:50 +00:00
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting security updates option
|
2007-09-23 08:05:14 +00:00
|
|
|
if [ "${LIVE_MIRROR_BOOTSTRAP_SECURITY}" = "none" ] || [ "${LIVE_MIRROR_BINARY_SECURITY}" = "none" ]
|
|
|
|
then
|
|
|
|
LIVE_SECURITY="disabled"
|
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_SECURITY="${LIVE_SECURITY:-enabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
# Setting symlink convertion option
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_SYMLINKS="${LIVE_SYMLINKS:-disabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
# Setting sysvinit option
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_SYSVINIT="${LIVE_SYSVINIT:-disabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
## config/binary
|
|
|
|
|
|
|
|
# Setting image type
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_BINARY_IMAGES="${LIVE_BINARY_IMAGES:-iso}"
|
2007-09-23 08:05:10 +00:00
|
|
|
|
|
|
|
# Setting apt indices
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_BINARY_INDICES="${LIVE_BINARY_INDICES:-enabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
# Setting boot parameters
|
|
|
|
# LIVE_BOOTAPPEND
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting bootloader
|
|
|
|
if [ -z "${LIVE_BOOTLOADER}" ]
|
|
|
|
then
|
|
|
|
case "${LIVE_ARCHITECTURE}" in
|
|
|
|
amd64|i386)
|
|
|
|
LIVE_BOOTLOADER="syslinux"
|
|
|
|
;;
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
powerpc)
|
|
|
|
LIVE_BOOTLOADER="yaboot"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Setting debian-installer option
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER:-disabled}"
|
2007-09-23 08:04:48 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting encryption
|
|
|
|
# LIVE_ENCRYPTION
|
|
|
|
|
|
|
|
# Setting grub splash
|
|
|
|
# LIVE_GRUB_SPLASH
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Setting hostname
|
|
|
|
if [ -z "${LIVE_HOSTNAME}" ]
|
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
LIVE_HOSTNAME="debian"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
|
|
|
LIVE_HOSTNAME="ubuntu"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:48 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting iso author
|
|
|
|
if [ -z "${LIVE_ISO_APPLICATION}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:05:10 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
|
|
|
LIVE_ISO_APPLICATION="Debian Live"
|
|
|
|
;;
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
ubuntu)
|
|
|
|
LIVE_ISO_APPLICATION="Ubuntu Live"
|
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Set iso preparer
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_ISO_PREPARER="${LIVE_ISO_PREPARER:-live-helper ${VERSION}; http://packages.qa.debian.org/live-helper}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Set iso publisher
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_ISO_PUBLISHER="${LIVE_ISO_PUBLISHER:-Debian Live project; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org}"
|
2007-09-23 08:04:52 +00:00
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting iso volume
|
|
|
|
if [ -z "${LIVE_ISO_VOLUME}" ]
|
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:10 +00:00
|
|
|
LIVE_ISO_VOLUME="Debian Live \`date +%Y%m%d-%H:%M\`"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:10 +00:00
|
|
|
LIVE_ISO_VOLUME="Ubuntu Live \`date +%Y%m%d-%H:%M\`"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting memtest option
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_MEMTEST="${LIVE_MEMTEST:-memtest86+}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:14 +00:00
|
|
|
# Setting netboot filesystem
|
|
|
|
LIVE_NET_FILESYSTEM="${LIVE_NET_FILESYSTEM:-nfs}"
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting netboot server path
|
2007-09-23 08:05:09 +00:00
|
|
|
if [ -z "${LIVE_NET_PATH}" ]
|
2007-09-23 08:04:46 +00:00
|
|
|
then
|
2007-09-23 08:04:49 +00:00
|
|
|
case "${LH_MODE}" in
|
|
|
|
debian)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_NET_PATH="/srv/debian-live"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ubuntu)
|
2007-09-23 08:05:09 +00:00
|
|
|
LIVE_NET_PATH="/srv/ubuntu-live"
|
2007-09-23 08:04:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
2007-09-23 08:04:46 +00:00
|
|
|
fi
|
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting netboot server address
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_NET_SERVER="${LIVE_NET_SERVER:-192.168.1.1}"
|
2007-09-23 08:05:10 +00:00
|
|
|
|
|
|
|
# Setting syslinux splash
|
|
|
|
# LIVE_SYSLINUX_SPLASH
|
|
|
|
|
|
|
|
# Setting username
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_USERNAME="${LIVE_USERNAME:-user}"
|
2007-09-23 08:05:10 +00:00
|
|
|
|
|
|
|
## config/source
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Setting source option
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_SOURCE="${LIVE_SOURCE:-disabled}"
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:10 +00:00
|
|
|
# Setting image type
|
2007-09-23 08:05:11 +00:00
|
|
|
LIVE_SOURCE_IMAGES="${LIVE_SOURCE_IMAGES:-tar}"
|
2007-09-23 08:04:46 +00:00
|
|
|
}
|