2007-09-23 08:04:46 +00:00
#!/bin/sh
2010-09-02 11:12:37 +00:00
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org>
##
## live-build 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_defaults ( )
{
## config/common
2010-08-14 18:29:05 +00:00
LH_BASE = " ${ LH_BASE :- /usr/share/live/build } "
2009-11-21 08:16:58 -01:00
2007-09-23 08:04:49 +00:00
# Setting mode
if [ -z " ${ LH_MODE } " ]
then
2007-10-19 10:45:57 +00:00
LH_MODE = "debian"
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:17 +00:00
if [ -z " ${ LH_DISTRIBUTION } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:11 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2010-08-14 18:02:54 +00:00
LH_DISTRIBUTION = "squeeze"
2007-09-23 12:05:11 +00:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
LH_DISTRIBUTION = "sid"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
2009-12-14 06:43:33 -01:00
LH_DISTRIBUTION = "karmic"
2009-04-15 20:07:26 +00:00
; ;
2007-09-23 08:05:11 +00:00
esac
2007-09-23 08:04:46 +00:00
fi
2007-09-23 08:05:11 +00:00
# Setting package manager
2009-11-16 10:40:43 -01:00
LH_APT = " ${ LH_APT :- apt } "
2007-09-23 08:05:11 +00:00
2007-09-23 08:04:46 +00:00
# Setting apt ftp proxy
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_APT_FTP_PROXY } " ] && [ -n " ${ ftp_proxy } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:17 +00:00
LH_APT_FTP_PROXY = " ${ ftp_proxy } "
2007-09-23 08:04:46 +00:00
else
2007-09-23 08:05:17 +00:00
if [ -n " ${ LH_APT_FTP_PROXY } " ] && [ " ${ LH_APT_FTP_PROXY } " != " ${ ftp_proxy } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:17 +00:00
ftp_proxy = " ${ LH_APT_FTP_PROXY } "
2007-09-23 08:04:46 +00:00
fi
fi
# Setting apt http proxy
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_APT_HTTP_PROXY } " ] && [ -n " ${ http_proxy } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:17 +00:00
LH_APT_HTTP_PROXY = " ${ http_proxy } "
2007-09-23 08:04:46 +00:00
else
2007-09-23 08:05:17 +00:00
if [ -n " ${ LH_APT_HTTP_PROXY } " ] && [ " ${ LH_APT_HTT_PROXY } " != " ${ http_proxy } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:17 +00:00
http_proxy = " ${ LH_APT_HTTP_PROXY } "
2007-09-23 08:04:46 +00:00
fi
fi
# Setting apt pdiffs
2009-12-13 19:17:45 -01:00
LH_APT_PDIFFS = " ${ LH_APT_PDIFFS :- true } "
2007-09-23 08:05:11 +00:00
# Setting apt pipeline
# LH_APT_PIPELINE
2007-09-23 08:04:46 +00:00
2008-02-21 18:03:57 -01:00
APT_OPTIONS = " ${ APT_OPTIONS :- --yes } "
APTITUDE_OPTIONS = " ${ APTITUDE_OPTIONS :- --assume-yes } "
2009-09-11 07:39:13 +00:00
GZIP_OPTIONS = " ${ GZIP_OPTIONS :- --best } "
2010-06-21 20:26:11 +00:00
if gzip --help | grep -qs "\-\-rsyncable"
2009-09-11 07:39:13 +00:00
then
2010-06-21 20:26:11 +00:00
GZIP_OPTIONS = " $( echo ${ GZIP_OPTIONS } | sed -e 's|--rsyncable||' ) --rsyncable "
2009-09-11 07:39:13 +00:00
fi
2007-09-23 08:04:46 +00:00
# Setting apt recommends
2007-09-23 08:05:17 +00:00
case " ${ LH_MODE } " in
2009-04-15 20:07:26 +00:00
debian| debian-release| ubuntu)
2009-12-13 19:17:45 -01:00
LH_APT_RECOMMENDS = " ${ LH_APT_RECOMMENDS :- true } "
2007-09-23 08:05:17 +00:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
2009-12-13 19:17:45 -01:00
LH_APT_RECOMMENDS = " ${ LH_APT_RECOMMENDS :- false } "
2008-12-08 10:24:11 -01:00
; ;
2007-09-23 08:05:17 +00:00
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:04:48 +00:00
# Setting apt secure
2009-12-13 19:17:45 -01:00
LH_APT_SECURE = " ${ LH_APT_SECURE :- true } "
2007-09-23 08:04:48 +00:00
2007-09-23 08:04:46 +00:00
# Setting bootstrap program
2009-03-01 11:28:42 -01:00
if [ -z " ${ LH_BOOTSTRAP } " ] || ( [ ! -x " $( which ${ LH_BOOTSTRAP } 2>/dev/null) " ] && [ " ${ LH_BOOTSTRAP } " != "copy" ] )
2007-09-23 08:04:46 +00:00
then
2007-10-19 10:45:57 +00:00
if [ -x "/usr/sbin/debootstrap" ]
then
LH_BOOTSTRAP = "debootstrap"
elif [ -x "/usr/bin/cdebootstrap" ]
then
LH_BOOTSTRAP = "cdebootstrap"
else
2009-01-31 09:22:23 -01:00
Echo_error "Cannot find /usr/sbin/debootstrap or /usr/bin/cdebootstrap. Please install debootstrap or cdebootstrap, or specify an alternative bootstrapping utility."
2007-10-19 10:45:57 +00:00
exit 1
fi
2007-09-23 08:04:46 +00:00
fi
# Setting cache option
2009-12-13 19:17:45 -01:00
LH_CACHE = " ${ LH_CACHE :- true } "
LH_CACHE_INDICES = " ${ LH_CACHE_INDICES :- false } "
LH_CACHE_PACKAGES = " ${ LH_CACHE_PACKAGES :- true } "
2007-09-23 08:05:11 +00:00
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
2009-12-13 19:17:45 -01:00
true )
2007-09-23 08:05:14 +00:00
LH_DEBCONF_NOWARNINGS = "yes"
; ;
2009-12-13 19:17:45 -01:00
false )
2007-09-23 08:05:14 +00:00
LH_DEBCONF_NOWARNINGS = "no"
; ;
esac
2007-09-23 08:05:10 +00:00
# Setting initramfs hook
if [ -z " ${ LH_INITRAMFS } " ]
then
2007-09-23 08:05:17 +00:00
LH_INITRAMFS = "auto"
else
if [ " ${ LH_INITRAMFS } " = "auto" ]
2007-09-23 08:05:10 +00:00
then
2007-09-23 08:05:17 +00:00
case " ${ LH_MODE } " in
2009-04-15 20:07:26 +00:00
ubuntu)
LH_INITRAMFS = "casper"
; ;
2008-12-08 10:24:11 -01:00
*)
LH_INITRAMFS = "live-initramfs"
; ;
2007-09-23 08:05:17 +00:00
esac
2007-09-23 08:05:10 +00:00
fi
fi
2007-11-12 20:43:28 -01:00
# Setting fdisk
2009-01-31 09:22:23 -01:00
if [ -z " ${ LH_FDISK } " ] || [ ! -x " ${ LH_FDISK } " ]
2007-11-12 20:43:28 -01:00
then
# Workaround for gnu-fdisk divertion
# (gnu-fdisk is buggy, #445304).
if [ -x /sbin/fdisk.distrib ]
then
LH_FDISK = "fdisk.distrib"
elif [ -x /sbin/fdisk ]
then
LH_FDISK = "fdisk"
else
2008-08-12 21:29:14 +00:00
Echo_error "Can't process file /sbin/fdisk"
2007-11-12 20:43:28 -01:00
fi
fi
2007-09-23 08:04:47 +00:00
# Setting losetup
2008-12-01 21:49:58 -01:00
if [ -z " ${ LH_LOSETUP } " ] || [ " ${ LH_LOSETUP } " != "/sbin/losetup.orig" ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:10 +00:00
# Workaround for loop-aes-utils divertion
2007-11-12 20:43:28 -01:00
# (loop-aes-utils' losetup lacks features).
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
2008-08-12 20:36:48 +00:00
Echo_error "Can't process file /sbin/losetup"
2007-09-23 08:04:47 +00:00
fi
2007-09-23 08:04:46 +00:00
fi
2007-09-24 06:47:42 +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:17 +00:00
LH_ROOT_COMMAND = ""
2007-09-23 08:05:11 +00:00
else
if [ -x /usr/bin/sudo ]
then
2009-12-13 19:17:45 -01:00
# FIXME: this is false until considered safe
2007-09-23 08:05:17 +00:00
#LH_ROOT_COMMAND="sudo"
LH_ROOT_COMMAND = ""
2007-09-23 08:05:11 +00:00
fi
2007-09-23 08:04:51 +00:00
fi
2007-09-23 08:05:10 +00:00
# Setting tasksel
2009-01-23 10:59:04 -01:00
LH_TASKSEL = " ${ LH_TASKSEL :- tasksel } "
2007-09-23 08:04:52 +00:00
2007-09-23 08:04:47 +00:00
# Setting root directory
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_ROOT } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:04:49 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2007-09-23 08:05:17 +00:00
LH_ROOT = "debian-live"
; ;
2008-12-08 10:24:11 -01:00
emdebian)
LH_ROOT = "emdebian-live"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
LH_ROOT = "ubuntu-live"
; ;
2007-09-23 08:04:49 +00:00
esac
fi
2007-09-23 08:04:52 +00:00
# Setting includes
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_INCLUDES } " ]
2007-09-23 08:04:52 +00:00
then
2009-11-21 08:16:58 -01:00
LH_INCLUDES = " ${ LH_BASE } /includes "
2007-09-23 08:04:52 +00:00
fi
# Setting templates
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_TEMPLATES } " ]
2007-09-23 08:04:52 +00:00
then
2009-11-21 08:16:58 -01:00
LH_TEMPLATES = " ${ LH_BASE } /templates "
2007-09-23 08:04:52 +00:00
fi
2007-09-23 08:04:49 +00:00
# Setting live helper options
2009-12-13 19:17:45 -01:00
_BREAKPOINTS = " ${ _BREAKPOINTS :- false } "
2009-01-10 13:42:47 -01:00
_COLOR = " ${ _COLOR :- false } "
2009-12-13 19:17:45 -01:00
_DEBUG = " ${ _DEBUG :- false } "
_FORCE = " ${ _FORCE :- false } "
_QUIET = " ${ _QUIET :- false } "
_VERBOSE = " ${ _VERBOSE :- false } "
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:05:17 +00:00
if [ -z " ${ LH_ARCHITECTURE } " ]
2007-09-23 08:04:46 +00:00
then
if [ -x "/usr/bin/dpkg" ]
then
2007-09-24 06:47:42 +00:00
LH_ARCHITECTURE = " $( dpkg --print-architecture) "
2007-09-23 08:04:46 +00:00
else
2008-08-31 22:46:38 +00:00
case " $( uname -m) " in
sparc| powerpc)
LH_ARCHITECTURE = " $( uname -m) "
; ;
x86_64)
LH_ARCHITECTURE = "amd64"
; ;
*)
Echo_warning "Can't determine architecture, assuming i386"
LH_ARCHITECTURE = "i386"
; ;
esac
2007-09-23 08:04:46 +00:00
fi
fi
2007-09-28 00:54:23 +00:00
# Include packages on base
# LH_BOOTSTRAP_INCLUDE
# Exclude packages on base
# LH_BOOTSTRAP_EXCLUDE
2007-09-23 08:04:47 +00:00
# Setting distribution configuration value
2007-09-23 08:05:17 +00:00
# LH_BOOTSTRAP_CONFIG
2007-09-23 08:04:46 +00:00
2007-09-23 08:04:47 +00:00
# Setting flavour value
2007-10-31 08:55:37 -01:00
case " ${ LH_BOOTSTRAP } " in
cdebootstrap)
LH_BOOTSTRAP_FLAVOUR = " ${ LH_BOOTSTRAP_FLAVOUR :- standard } "
; ;
esac
2007-09-23 08:05:11 +00:00
2008-04-04 17:24:47 +00:00
# Setting bootstrap keyring
2007-09-23 08:05:17 +00:00
# LH_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:17 +00:00
if [ -z " ${ LH_MIRROR_BOOTSTRAP } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:04:49 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2010-01-22 08:39:28 -01:00
LH_MIRROR_BOOTSTRAP = "http://ftp.de.debian.org/debian/"
2007-09-23 08:04:49 +00:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
LH_MIRROR_BOOTSTRAP = "http://buildd.emdebian.org/grip/"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
LH_MIRROR_BOOTSTRAP = "http://archive.ubuntu.com/ubuntu/"
; ;
*)
LH_MIRROR_BOOTSTRAP = "http://ports.ubuntu.com/"
; ;
esac
; ;
2007-09-23 08:04:49 +00:00
esac
2007-09-23 08:04:46 +00:00
fi
2008-02-21 18:52:37 -01:00
LH_MIRROR_CHROOT = " ${ LH_MIRROR_CHROOT :- ${ LH_MIRROR_BOOTSTRAP } } "
2007-09-23 08:04:48 +00:00
# Setting security mirror to fetch packages from
2008-02-21 18:52:37 -01:00
if [ -z " ${ LH_MIRROR_CHROOT_SECURITY } " ]
2007-09-23 08:04:46 +00:00
then
2008-12-08 10:24:11 -01:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2008-12-08 10:24:11 -01:00
LH_MIRROR_CHROOT_SECURITY = "http://security.debian.org/"
; ;
emdebian)
LH_MIRROR_CHROOT_SECURITY = "none"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
2010-03-11 15:48:12 -01:00
LH_MIRROR_CHROOT_SECURITY = "http://security.ubuntu.com/ubuntu/"
2009-04-15 20:07:26 +00:00
; ;
*)
LH_MIRROR_CHROOT_SECURITY = "http://ports.ubuntu.com/"
; ;
esac
; ;
2008-12-08 10:24:11 -01:00
esac
2007-09-23 08:04:46 +00:00
fi
2010-03-06 15:23:59 -01:00
# Setting volatile mirror to fetch packages from
if [ -z " ${ LH_MIRROR_CHROOT_VOLATILE } " ]
then
case " ${ LH_MODE } " in
debian| debian-release)
case " ${ LH_DISTRIBUTION } " in
lenny)
LH_MIRROR_CHROOT_VOLATILE = "http://volatile.debian.org/debian-volatile/"
; ;
esac
; ;
2010-03-11 16:03:29 -01:00
ubuntu)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
LH_MIRROR_CHROOT_VOLATILE = "http://security.ubuntu.com/ubuntu/"
; ;
*)
LH_MIRROR_CHROOT_VOLATILE = "http://ports.ubuntu.com/"
; ;
esac
; ;
2010-03-06 15:23:59 -01:00
esac
LH_MIRROR_CHROOT_VOLATILE = " ${ LH_MIRROR_CHROOT_VOLATILE :- none } "
fi
2007-09-23 08:04:48 +00:00
# Setting mirror which ends up in the image
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_MIRROR_BINARY } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:04:49 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2009-08-18 10:08:25 +00:00
LH_MIRROR_BINARY = "http://cdn.debian.net/debian/"
2007-09-23 08:04:49 +00:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
LH_MIRROR_BINARY = "http://buildd.emdebian.org/grip/"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
LH_MIRROR_BINARY = "http://archive.ubuntu.com/ubuntu/"
; ;
*)
LH_MIRROR_BINARY = "http://ports.ubuntu.com/"
; ;
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:17 +00:00
if [ -z " ${ LH_MIRROR_BINARY_SECURITY } " ]
2007-09-23 08:04:46 +00:00
then
2008-12-08 10:24:11 -01:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2008-12-08 10:24:11 -01:00
LH_MIRROR_BINARY_SECURITY = "http://security.debian.org/"
; ;
emdebian)
LH_MIRROR_BINARY_SECURITY = "none"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
LH_MIRROR_BINARY_SECURITY = "http://archive.ubuntu.com/ubuntu/"
; ;
*)
LH_MIRROR_BINARY_SECURITY = "http://ports.ubuntu.com/"
; ;
esac
; ;
2008-12-08 10:24:11 -01:00
esac
2007-09-23 08:04:46 +00:00
fi
2010-03-06 15:23:59 -01:00
# Setting volatile mirror which ends up in the image
if [ -z " ${ LH_MIRROR_BINARY_VOLATILE } " ]
then
case " ${ LH_MODE } " in
debian| debian-release)
case " ${ LH_DISTRIBUTION } " in
lenny)
LH_MIRROR_BINARY_VOLATILE = "http://volatile.debian.org/debian-volatile/"
; ;
esac
; ;
2010-03-11 16:03:29 -01:00
ubuntu)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
LH_MIRROR_BINARY_VOLATILE = "http://security.ubuntu.com/ubuntu/"
; ;
*)
LH_MIRROR_BINARY_VOLATILE = "http://ports.ubuntu.com/"
; ;
esac
; ;
2010-03-06 15:23:59 -01:00
esac
LH_MIRROR_BINARY_VOLATILE = " ${ LH_MIRROR_BINARY_VOLATILE :- none } "
fi
2010-03-04 11:22:15 -01:00
LH_MIRROR_DEBIAN_INSTALLER = " ${ LH_MIRROR_DEBIAN_INSTALLER :- ${ LH_MIRROR_BOOTSTRAP } } "
2009-11-22 12:40:20 -01:00
# Setting archive areas value
if [ -z " ${ LH_ARCHIVE_AREAS } " ]
2007-09-23 08:04:46 +00:00
then
2009-04-17 19:32:48 +00:00
case " ${ LH_MODE } " in
ubuntu)
2009-11-22 12:40:20 -01:00
LH_ARCHIVE_AREAS = "main restricted"
2009-04-17 19:32:48 +00:00
; ;
*)
2009-11-22 12:40:20 -01:00
LH_ARCHIVE_AREAS = "main"
2009-04-17 19:32:48 +00:00
; ;
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:17 +00:00
LH_CHROOT_FILESYSTEM = " ${ LH_CHROOT_FILESYSTEM :- squashfs } "
2007-09-23 08:05:10 +00:00
2009-02-25 07:51:28 -01:00
# Setting virtual root size
LH_VIRTUAL_ROOT_SIZE = " ${ LH_VIRTUAL_ROOT_SIZE :- 10000 } "
2007-10-23 20:56:43 +00:00
# Setting whether to expose root filesystem as read only
2009-12-13 19:17:45 -01:00
LH_EXPOSED_ROOT = " ${ LH_EXPOSED_ROOT :- false } "
2007-10-23 20:56:43 +00:00
2007-09-23 08:05:13 +00:00
# Setting union filesystem
2009-11-16 10:40:43 -01:00
LH_UNION_FILESYSTEM = " ${ LH_UNION_FILESYSTEM :- aufs } "
2007-09-23 08:05:13 +00:00
2007-09-23 08:05:17 +00:00
# LH_HOOKS
2007-09-23 08:05:10 +00:00
2007-09-23 08:04:48 +00:00
# Setting interactive shell/X11/Xnest
2009-12-13 19:17:45 -01:00
LH_INTERACTIVE = " ${ LH_INTERACTIVE :- false } "
2007-09-23 08:04:48 +00:00
2007-09-23 08:05:10 +00:00
# Setting keyring packages
2007-09-23 08:05:17 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2009-03-24 20:37:34 -01:00
LH_KEYRING_PACKAGES = " ${ LH_KEYRING_PACKAGES :- debian -archive-keyring } "
2007-09-23 08:05:17 +00:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
2010-08-18 12:16:56 +00:00
LH_KEYRING_PACKAGES = " ${ LH_KEYRING_PACKAGES :- debian -archive-keyring } "
2008-12-08 10:24:11 -01:00
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
LH_KEYRING_PACKAGES = " ${ LH_KEYRING_PACKAGES :- ubuntu -keyring } "
; ;
2007-09-23 08:05:17 +00:00
esac
2007-09-23 08:05:10 +00:00
# Setting language string
2007-09-23 12:05:09 +00:00
LH_LANGUAGE = " ${ LH_LANGUAGE :- en } "
2007-09-23 08:05:10 +00:00
# Setting linux flavour string
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_LINUX_FLAVOURS } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:17 +00:00
case " ${ LH_ARCHITECTURE } " in
2010-02-17 12:57:12 -01:00
arm| armel)
Echo_error "There is no default kernel flavour defined for your architecture."
2010-09-02 13:14:29 +00:00
Echo_error "Please configure it manually with 'lb config -k FLAVOUR'."
2010-02-17 12:57:12 -01:00
exit 1
; ;
2007-09-23 08:04:46 +00:00
alpha)
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
Echo_error " Architecture ${ LH_ARCHITECTURE } not supported on Ubuntu. "
2009-11-01 09:39:31 -01:00
exit 1
2009-04-15 20:07:26 +00:00
; ;
*)
LH_LINUX_FLAVOURS = "alpha-generic"
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
amd64)
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
LH_LINUX_FLAVOURS = "generic"
; ;
*)
LH_LINUX_FLAVOURS = "amd64"
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
hppa)
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
LH_LINUX_FLAVOURS = "hppa32 hppa64"
; ;
*)
LH_LINUX_FLAVOURS = "parisc"
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
i386)
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
LH_LINUX_FLAVOURS = "generic"
2008-09-03 09:02:30 +00:00
; ;
*)
2009-04-15 20:07:26 +00:00
case " ${ LIST } " in
stripped| minimal)
LH_LINUX_FLAVOURS = "486"
; ;
*)
LH_LINUX_FLAVOURS = "486 686"
; ;
esac
2008-09-03 09:02:30 +00:00
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
ia64)
2007-09-23 08:05:17 +00:00
LH_LINUX_FLAVOURS = "itanium"
2007-09-23 08:04:46 +00:00
; ;
powerpc)
2008-09-03 09:02:30 +00:00
case " ${ LIST } " in
stripped| minimal)
LH_LINUX_FLAVOURS = "powerpc"
; ;
*)
LH_LINUX_FLAVOURS = "powerpc powerpc64"
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
s390)
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
Echo_error " Architecture ${ LH_ARCHITECTURE } not supported on Ubuntu. "
2009-04-17 08:23:38 +00:00
exit 1
2009-04-15 20:07:26 +00:00
; ;
*)
LH_LINUX_FLAVOURS = "s390"
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
sparc)
2009-11-16 10:40:43 -01:00
LH_LINUX_FLAVOURS = "sparc64"
2007-09-23 08:04:46 +00:00
; ;
*)
2009-04-15 20:07:26 +00:00
Echo_error " Architecture ${ LH_ARCHITECTURE } not yet supported (FIXME) "
2009-04-17 08:23:38 +00:00
exit 1
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:17 +00:00
if [ -z " ${ LH_LINUX_PACKAGES } " ]
2007-09-23 08:04:46 +00:00
then
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
debian| debian-release| embedian)
2009-10-27 20:28:11 -01:00
case " ${ LH_DISTRIBUTION } " in
2010-01-23 20:22:58 -01:00
lenny)
2009-10-27 20:28:11 -01:00
LH_LINUX_PACKAGES = "linux-image-2.6 \${LH_UNION_FILESYSTEM}-modules-2.6"
; ;
*)
LH_LINUX_PACKAGES = "linux-image-2.6"
; ;
esac
2007-09-23 08:04:49 +00:00
2009-04-15 20:07:26 +00:00
if [ " ${ LH_CHROOT_FILESYSTEM } " = "squashfs" ]
then
2009-04-16 17:00:05 +00:00
case " ${ LH_DISTRIBUTION } " in
2009-11-16 10:40:43 -01:00
lenny)
2009-04-16 17:00:05 +00:00
LH_LINUX_PACKAGES = " ${ LH_LINUX_PACKAGES } squashfs-modules-2.6 "
; ;
esac
2009-04-15 20:07:26 +00:00
fi
2007-09-23 08:04:46 +00:00
2009-04-15 20:07:26 +00:00
case " ${ LH_ENCRYPTION } " in
2009-12-13 19:17:45 -01:00
"" | false )
2009-04-15 20:07:26 +00:00
; ;
*)
LH_LINUX_PACKAGES = " ${ LH_LINUX_PACKAGES } loop-aes-modules-2.6 "
; ;
esac
2008-03-23 03:21:47 -01:00
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
LH_LINUX_PACKAGES = "linux"
2008-03-23 03:21:47 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
fi
# Setting packages string
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
2009-07-22 21:30:05 +00:00
LH_PACKAGES = " ${ LH_PACKAGES :- ubuntu -minimal } "
2009-04-15 20:07:26 +00:00
; ;
*)
LH_PACKAGES_LISTS = " ${ LH_PACKAGES_LISTS :- standard } "
; ;
esac
2009-02-01 09:51:51 -01:00
case " ${ LH_ENCRYPTION } " in
2009-12-13 19:17:45 -01:00
"" | false )
2009-04-15 20:07:26 +00:00
2009-02-01 09:51:51 -01:00
; ;
*)
if ! In_list loop-aes-utils " ${ LH_PACKAGES } "
then
LH_PACKAGES = " ${ LH_PACKAGES } loop-aes-utils "
fi
; ;
esac
2007-09-23 08:04:46 +00:00
# Setting tasks string
2007-09-23 08:05:17 +00:00
for LIST in ${ LH_PACKAGES_LISTS }
2007-09-23 08:04:46 +00:00
do
case " ${ LIST } " in
2008-01-17 16:15:11 -01:00
stripped| minimal)
2007-09-23 08:04:50 +00:00
LH_APT = "apt-get"
; ;
2007-09-23 08:04:46 +00:00
gnome-desktop)
2008-01-15 06:25:29 -01:00
LH_PACKAGES_LISTS = " $( echo ${ LH_PACKAGES_LISTS } | sed -e 's|gnome-desktop||' ) standard-x11 "
2010-02-20 22:37:32 -01:00
case " ${ LH_DISTRIBUTION } " in
lenny)
LH_TASKS = " $( echo ${ LH_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 "
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
kde-desktop)
2008-01-15 06:25:29 -01:00
LH_PACKAGES_LISTS = " $( echo ${ LH_PACKAGES_LISTS } | sed -e 's|kde-desktop||' ) standard-x11 "
2010-02-20 22:37:32 -01:00
case " ${ LH_DISTRIBUTION } " in
lenny)
LH_TASKS = " $( echo ${ LH_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 "
esac
2007-09-23 08:04:46 +00:00
; ;
2008-11-30 09:37:06 -01:00
lxde-desktop)
LH_PACKAGES_LISTS = " $( echo ${ LH_PACKAGES_LISTS } | sed -e 's|lxde-desktop||' ) standard-x11 "
2010-02-20 22:37:32 -01:00
case " ${ LH_DISTRIBUTION } " in
lenny)
LH_TASKS = " $( echo ${ LH_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 "
; ;
esac
2008-11-30 09:37:06 -01:00
; ;
2007-09-23 08:04:46 +00:00
xfce-desktop)
2008-01-15 06:25:29 -01:00
LH_PACKAGES_LISTS = " $( echo ${ LH_PACKAGES_LISTS } | sed -e 's|xfce-desktop||' ) standard-x11 "
2010-02-20 22:37:32 -01:00
case " ${ LH_DISTRIBUTION } " in
lenny)
LH_TASKS = " $( echo ${ LH_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 "
; ;
esac
2007-09-23 08:04:46 +00:00
; ;
esac
done
2008-01-15 06:25:29 -01:00
LH_PACKAGES_LISTS = " $( echo ${ LH_PACKAGES_LISTS } | sed -e 's| ||g' ) "
LH_TASKS = " $( echo ${ LH_TASKS } | sed -e 's| ||g' ) "
2007-09-23 08:04:48 +00:00
2007-09-23 08:04:46 +00:00
# Setting security updates option
2008-02-21 18:52:37 -01:00
if [ " ${ LH_MIRROR_CHROOT_SECURITY } " = "none" ] || [ " ${ LH_MIRROR_BINARY_SECURITY } " = "none" ]
2007-09-23 08:05:14 +00:00
then
2009-12-13 19:17:45 -01:00
LH_SECURITY = "false"
2007-09-23 08:05:14 +00:00
fi
2009-12-13 19:17:45 -01:00
LH_SECURITY = " ${ LH_SECURITY :- true } "
2007-09-23 08:04:46 +00:00
2010-03-06 15:23:59 -01:00
# Setting volatile updates option
if [ " ${ LH_MIRROR_CHROOT_VOLATILE } " = "none" ] || [ " ${ LH_MIRROR_BINARY_VOLATILE } " = "none" ]
then
LH_VOLATILE = "false"
fi
LH_VOLATILE = " ${ LH_VOLATILE :- true } "
2007-09-23 08:04:46 +00:00
# Setting symlink convertion option
2009-12-13 19:17:45 -01:00
LH_SYMLINKS = " ${ LH_SYMLINKS :- false } "
2007-09-23 08:04:46 +00:00
# Setting sysvinit option
2009-12-13 19:17:45 -01:00
LH_SYSVINIT = " ${ LH_SYSVINIT :- false } "
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
## config/binary
2007-11-16 21:01:03 -01:00
# Setting image filesystem
2008-06-15 15:27:35 +00:00
case " ${ LH_ARCHITECTURE } " in
sparc)
LH_BINARY_FILESYSTEM = " ${ LH_BINARY_FILESYSTEM :- ext2 } "
; ;
2009-04-15 20:07:26 +00:00
2008-06-15 15:27:35 +00:00
*)
LH_BINARY_FILESYSTEM = " ${ LH_BINARY_FILESYSTEM :- fat16 } "
; ;
esac
2007-11-16 21:01:03 -01:00
2007-09-23 08:05:10 +00:00
# Setting image type
2010-02-18 15:34:29 -01:00
case " ${ LH_DISTRIBUTION } " in
squeeze| sid)
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
LH_BINARY_IMAGES = " ${ LH_BINARY_IMAGES :- iso -hybrid } "
; ;
*)
LH_BINARY_IMAGES = " ${ LH_BINARY_IMAGES :- iso } "
; ;
esac
; ;
*)
LH_BINARY_IMAGES = " ${ LH_BINARY_IMAGES :- iso } "
; ;
esac
2007-09-23 08:05:10 +00:00
# Setting apt indices
2009-02-13 08:17:29 -01:00
if echo ${ LH_PACKAGES_LISTS } | grep -qs -E "(stripped|minimal)\b"
then
LH_BINARY_INDICES = " ${ LH_BINARY_INDICES :- none } "
else
2009-12-13 19:17:45 -01:00
LH_BINARY_INDICES = " ${ LH_BINARY_INDICES :- true } "
2009-02-13 08:17:29 -01:00
fi
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Setting bootloader
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_BOOTLOADER } " ]
2007-09-23 08:05:10 +00:00
then
2007-09-23 08:05:17 +00:00
case " ${ LH_ARCHITECTURE } " in
2009-12-09 19:54:41 -01:00
amd64| i386)
2007-09-23 08:05:17 +00:00
LH_BOOTLOADER = "syslinux"
2007-09-23 08:05:10 +00:00
; ;
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
powerpc)
2007-09-23 08:05:17 +00:00
LH_BOOTLOADER = "yaboot"
2007-09-23 08:05:10 +00:00
; ;
2008-06-15 03:46:51 +00:00
sparc)
LH_BOOTLOADER = "silo"
; ;
2007-09-23 08:05:10 +00:00
esac
fi
2007-11-12 21:00:48 -01:00
# Setting checksums
2010-05-01 06:24:56 +00:00
LH_CHECKSUMS = " ${ LH_CHECKSUMS :- md5 } "
2007-11-12 21:00:48 -01:00
2007-09-23 08:05:15 +00:00
# Setting chroot option
2010-05-21 08:55:55 +00:00
LH_BUILD_WITH_CHROOT = " ${ LH_BUILD_WITH_CHROOT :- true } "
2007-09-23 08:05:15 +00:00
2007-09-23 08:05:10 +00:00
# Setting debian-installer option
2009-12-13 19:17:45 -01:00
LH_DEBIAN_INSTALLER = " ${ LH_DEBIAN_INSTALLER :- false } "
2007-09-23 08:04:48 +00:00
2008-08-10 00:38:06 +00:00
# Setting debian-installer distribution
LH_DEBIAN_INSTALLER_DISTRIBUTION = " ${ LH_DEBIAN_INSTALLER_DISTRIBUTION :- ${ LH_DISTRIBUTION } } "
2009-09-02 05:39:13 +00:00
# Setting debian-installer-gui
case " ${ LH_MODE } " in
debian)
2010-03-06 16:23:34 -01:00
case " ${ LH_DISTRIBUTION } " in
squeeze| sid)
LH_DEBIAN_INSTALLER_GUI = " ${ LH_DEBIAN_INSTALLER_GUI :- false } "
; ;
*)
LH_DEBIAN_INSTALLER_GUI = " ${ LH_DEBIAN_INSTALLER_GUI :- true } "
; ;
esac
2009-09-02 05:39:13 +00:00
; ;
ubuntu)
case " ${ LH_DEBIAN_INSTALLER_DISTRIBUTION } " in
karmic)
# Not available for Karmic currently.
2009-12-13 19:17:45 -01:00
LH_DEBIAN_INSTALLER_GUI = " ${ LH_DEBIAN_INSTALLER_GUI :- false } "
2009-09-02 05:39:13 +00:00
; ;
*)
2009-12-13 19:17:45 -01:00
LH_DEBIAN_INSTALLER_GUI = " ${ LH_DEBIAN_INSTALLER_GUI :- true } "
2009-09-02 05:39:13 +00:00
; ;
esac
; ;
*)
2009-12-13 19:17:45 -01:00
LH_DEBIAN_INSTALLER_GUI = " ${ LH_DEBIAN_INSTALLER_GUI :- false } "
2009-09-02 05:39:13 +00:00
; ;
esac
2008-08-12 20:04:25 +00:00
# Setting debian-installer preseed filename
if [ -z " ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } " ]
then
if Find_files config/binary_debian-installer/preseed.cfg
then
2008-08-12 20:11:18 +00:00
LH_DEBIAN_INSTALLER_PRESEEDFILE = "/preseed.cfg"
2008-08-12 20:04:25 +00:00
fi
if Find_files config/binary_debian-installer/*.cfg && [ ! -e config/binary_debian-installer/preseed.cfg ]
then
2009-01-15 00:38:34 -01:00
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."
2008-08-12 20:04:25 +00:00
fi
fi
# Setting boot parameters
# LH_BOOTAPPEND_LIVE
if [ -n " ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } " ]
then
case " ${ LH_BINARY_IMAGES } " in
2010-02-18 15:34:29 -01:00
iso*)
2008-08-12 21:26:38 +00:00
_LH_BOOTAPPEND_PRESEED = " file=/cdrom/install/ ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } "
2008-08-12 20:04:25 +00:00
; ;
2010-02-18 15:12:59 -01:00
usb*)
2009-08-09 13:05:24 +00:00
if [ " ${ LH_MODE } " = "ubuntu" ] || [ " ${ LH_DEBIAN_INSTALLER } " = "live" ]
2009-05-27 16:08:35 +00:00
then
_LH_BOOTAPPEND_PRESEED = " file=/cdrom/install/ ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } "
else
_LH_BOOTAPPEND_PRESEED = " file=/hd-media/install/ ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } "
fi
2008-08-12 20:11:18 +00:00
; ;
net)
2008-08-12 20:21:40 +00:00
case " ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } " in
*://*)
2008-08-12 21:26:38 +00:00
_LH_BOOTAPPEND_PRESEED = " file= ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } "
2008-08-12 20:21:40 +00:00
; ;
*)
2008-08-12 21:26:38 +00:00
_LH_BOOTAPPEND_PRESEED = " file=/ ${ LH_DEBIAN_INSTALLER_PRESEEDFILE } "
2008-08-12 20:21:40 +00:00
; ;
esac
2008-08-12 20:04:25 +00:00
; ;
esac
fi
2010-02-18 15:12:59 -01:00
case " ${ LH_BINARY_IMAGES } " in
2010-07-16 03:10:26 +00:00
iso-hybrid| usb*)
2010-02-18 15:12:59 -01:00
# Try USB block devices for install media
if ! echo " ${ LH_BOOTAPPEND_INSTALL } " | grep -q try-usb
then
LH_BOOTAPPEND_INSTALL = " cdrom-detect/try-usb=true ${ LH_BOOTAPPEND_INSTALL } "
fi
; ;
esac
2009-05-27 16:08:35 +00:00
2009-11-13 07:27:00 -01:00
if [ -n ${ _LH_BOOTAPPEND_PRESEED } ]
then
LH_BOOTAPPEND_INSTALL = " ${ LH_BOOTAPPEND_INSTALL } ${ _LH_BOOTAPPEND_PRESEED } "
fi
2008-08-12 20:04:25 +00:00
2010-02-17 10:23:34 -01:00
LH_BOOTAPPEND_INSTALL = " $( echo ${ LH_BOOTAPPEND_INSTALL } | sed -e 's/[ \t]*$//' ) "
2007-09-23 08:05:10 +00:00
# Setting encryption
2009-12-13 19:17:45 -01:00
LH_ENCRYPTION = " ${ LH_ENCRYPTION :- false } "
2007-09-23 08:05:10 +00:00
# Setting grub splash
2007-09-23 08:05:17 +00:00
# LH_GRUB_SPLASH
2007-09-23 08:05:10 +00:00
2007-09-23 08:04:48 +00:00
# Setting hostname
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_HOSTNAME } " ]
2007-09-23 08:04:48 +00:00
then
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
embedian)
LH_HOSTNAME = "embedian"
; ;
ubuntu)
LH_HOSTNAME = "ubuntu"
; ;
*)
LH_HOSTNAME = "debian"
; ;
esac
2007-09-23 08:04:48 +00:00
fi
2007-09-23 08:05:10 +00:00
# Setting iso author
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_ISO_APPLICATION } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:10 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2007-09-23 08:05:17 +00:00
LH_ISO_APPLICATION = "Debian Live"
; ;
2008-12-08 10:24:11 -01:00
emdebian)
LH_ISO_APPLICATION = "Emdebian Live"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
LH_ISO_APPLICATION = "Ubuntu Live"
; ;
2007-09-23 08:05:10 +00:00
esac
2007-09-23 08:04:46 +00:00
fi
2007-09-23 08:05:10 +00:00
# Set iso preparer
2010-09-02 11:22:22 +00:00
LH_ISO_PREPARER = " ${ LH_ISO_PREPARER :- live -build \$ VERSION ; http : //packages.qa.debian.org/live-build } "
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Set iso publisher
2010-09-02 19:06:17 +00:00
LH_ISO_PUBLISHER = " ${ LH_ISO_PUBLISHER :- Debian Live project; http : //live.debian.net/; debian-live@lists.debian.org } "
2007-09-23 08:04:52 +00:00
2007-09-23 08:04:46 +00:00
# Setting iso volume
2007-09-23 08:05:17 +00:00
if [ -z " ${ LH_ISO_VOLUME } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:04:49 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:13:32 -01:00
debian)
2009-02-18 15:53:09 -01:00
LH_ISO_VOLUME = " Debian ${ LH_DISTRIBUTION } \$(date +%Y%m%d-%H:%M) "
2007-09-23 08:05:17 +00:00
; ;
2008-12-08 10:24:11 -01:00
2009-02-08 09:13:32 -01:00
debian-release)
eval VERSION = " $`echo RELEASE_ ${ LH_DISTRIBUTION } ` "
2009-02-08 09:22:58 -01:00
LH_ISO_VOLUME = " Debian ${ VERSION } ${ LH_ARCHITECTURE } live "
2009-02-08 09:13:32 -01:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
2009-02-18 15:53:09 -01:00
LH_ISO_VOLUME = " Emdebian ${ LH_DISTRIBUTION } \$(date +%Y%m%d-%H:%M) "
2008-12-08 10:24:11 -01:00
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
LH_ISO_VOLUME = " Ubuntu ${ LH_DISTRIBUTION } \$(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:17 +00:00
LH_MEMTEST = " ${ LH_MEMTEST :- memtest86 + } "
2007-09-23 08:04:46 +00:00
2008-08-14 19:33:56 +00:00
# Setting win32-loader option
2009-12-09 19:56:17 -01:00
if [ " ${ LH_MODE } " != "ubuntu" ]
then
case " ${ LH_ARCHITECTURE } " in
amd64| i386)
2009-12-13 19:17:45 -01:00
if [ " ${ LH_DEBIAN_INSTALLER } " != "false" ]
2009-12-09 19:56:17 -01:00
then
2009-12-13 19:17:45 -01:00
LH_WIN32_LOADER = " ${ LH_WIN32_LOADER :- true } "
2009-12-09 19:56:17 -01:00
else
2009-12-13 19:17:45 -01:00
LH_WIN32_LOADER = " ${ LH_WIN32_LOADER :- false } "
2009-12-09 19:56:17 -01:00
fi
; ;
2008-08-14 19:33:56 +00:00
2009-12-09 19:56:17 -01:00
*)
2009-12-13 19:17:45 -01:00
LH_WIN32_LOADER = " ${ LH_WIN32_LOADER :- false } "
2009-12-09 19:56:17 -01:00
; ;
esac
fi
2008-08-14 19:33:56 +00:00
2007-09-23 08:05:14 +00:00
# Setting netboot filesystem
2007-10-30 17:17:16 -01:00
LH_NET_ROOT_FILESYSTEM = " ${ LH_NET_ROOT_FILESYSTEM :- nfs } "
2007-09-23 08:05:14 +00:00
2007-09-23 08:04:46 +00:00
# Setting netboot server path
2007-10-30 17:17:16 -01:00
if [ -z " ${ LH_NET_ROOT_PATH } " ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:04:49 +00:00
case " ${ LH_MODE } " in
2009-02-08 09:10:07 -01:00
debian| debian-release)
2007-10-30 17:17:16 -01:00
LH_NET_ROOT_PATH = "/srv/debian-live"
2007-09-23 08:05:17 +00:00
; ;
2008-12-08 10:24:11 -01:00
emdebian)
LH_NET_ROOT_PATH = "/srv/emdebian-live"
; ;
2009-04-15 20:07:26 +00:00
ubuntu)
LH_NET_ROOT_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-10-30 17:17:16 -01:00
LH_NET_ROOT_SERVER = " ${ LH_NET_ROOT_SERVER :- 192 .168.1.1 } "
# Setting net cow filesystem
LH_NET_COW_FILESYSTEM = " ${ LH_NET_COW_FILESYSTEM :- nfs } "
2007-09-23 08:05:10 +00:00
2008-02-26 17:57:41 -01:00
# Setting net tarball
2008-03-01 21:18:30 -01:00
LH_NET_TARBALL = " ${ LH_NET_TARBALL :- gzip } "
2008-02-26 17:57:41 -01:00
2007-09-19 00:42:09 +00:00
# Setting syslinux configuration file
# LH_SYSLINUX_CFG
2007-09-23 08:05:10 +00:00
# Setting syslinux splash
2007-09-23 08:05:17 +00:00
# LH_SYSLINUX_SPLASH
LH_SYSLINUX_TIMEOUT = " ${ LH_SYSLINUX_TIMEOUT :- 0 } "
2007-09-23 08:05:10 +00:00
2007-09-19 00:42:09 +00:00
# Setting syslinux menu
2009-12-13 19:17:45 -01:00
LH_SYSLINUX_MENU = " ${ LH_SYSLINUX_MENU :- true } "
2007-09-19 00:42:09 +00:00
# Setting syslinux menu live entries
2009-02-14 09:07:17 -01:00
case " ${ LH_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) } "
; ;
*)
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) } "
; ;
esac
2007-09-19 00:42:09 +00:00
# Settings memtest menu entry
LH_SYSLINUX_MENU_MEMTEST_ENTRY = " ${ LH_SYSLINUX_MENU_MEMTEST_ENTRY :- Memory test } "
2007-09-23 08:05:10 +00:00
# Setting username
2009-04-15 20:07:26 +00:00
case " ${ LH_MODE } " in
ubuntu)
LH_USERNAME = " ${ LH_USERNAME :- ubuntu } "
; ;
*)
LH_USERNAME = " ${ LH_USERNAME :- user } "
; ;
esac
2007-09-23 08:05:10 +00:00
## config/source
2007-09-23 08:04:46 +00:00
# Setting source option
2009-12-13 19:17:45 -01:00
LH_SOURCE = " ${ LH_SOURCE :- false } "
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Setting image type
2007-09-23 08:05:17 +00:00
LH_SOURCE_IMAGES = " ${ LH_SOURCE_IMAGES :- tar } "
2007-11-10 16:39:49 -01:00
# Setting fakeroot/fakechroot
2009-12-13 19:17:45 -01:00
LH_USE_FAKEROOT = " ${ LH_USE_FAKEROOT :- false } "
2007-09-23 08:04:46 +00:00
}
2007-11-11 12:14:25 -01:00
Check_defaults ( )
{
2009-10-30 10:29:05 -01:00
if [ " ${ LH_CONFIG_VERSION } " ]
then
# We're only checking when we're actually running the checks
# that's why the check for emptyness of the version;
2010-09-02 11:22:22 +00:00
# however, as live-build always declares LH_CONFIG_VERSION
2009-10-30 10:29:05 -01:00
# 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 }' ) "
2009-11-16 06:28:06 -01:00
if [ ${ CURRENT_CONFIG_VERSION } -ge 3 ]
2009-10-30 10:29:05 -01:00
then
2010-09-02 11:22:22 +00:00
Echo_error " This config tree is too new for this version of live-build ( ${ VERSION } ). "
Echo_error "Aborting build, please get a new version of live-build."
2009-10-30 10:29:05 -01:00
2009-11-16 06:28:06 -01:00
exit 1
elif [ ${ CURRENT_CONFIG_VERSION } -eq 1 ]
then
2010-09-02 11:22:22 +00:00
Echo_error " This config tree is too old for this version of live-build ( ${ VERSION } ). "
2009-11-16 06:28:06 -01:00
Echo_error "Aborting build, please repopulate the config tree."
2009-10-30 10:29:05 -01:00
exit 1
elif [ ${ CURRENT_CONFIG_VERSION } -lt 1 ]
then
Echo_warning "This config tree does not specify a format version or has an unknown version number."
2009-11-01 09:43:32 -01:00
Echo_warning "Continuing build, but it could lead to errors or different results. Please repopulate the config tree."
2009-10-30 10:29:05 -01:00
fi
fi
2008-06-20 00:32:03 +00:00
if echo ${ LH_PACKAGES_LISTS } | grep -qs -E "(stripped|minimal)\b"
2007-12-22 07:10:25 -01:00
then
2009-01-14 18:26:34 -01:00
# aptitude + stripped|minimal
2007-12-22 07:10:25 -01:00
if [ " ${ LH_APT } " = "aptitude" ]
then
2009-11-01 09:45:28 -01:00
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. "
2007-12-22 07:10:25 -01:00
fi
fi
2008-08-07 19:06:39 +00:00
2009-12-13 19:17:45 -01:00
if [ " ${ LH_DEBIAN_INSTALLER } " != "false" ]
2008-08-07 19:06:39 +00:00
then
2009-12-13 19:17:45 -01:00
# d-i true, no caching
if ! echo ${ LH_CACHE_STAGES } | grep -qs "bootstrap\b" || [ " ${ LH_CACHE } " != "true" ] || [ " ${ LH_CACHE_PACKAGES } " != "true" ]
2008-08-07 19:06:39 +00:00
then
2009-11-01 09:45:28 -01:00
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."
2008-08-07 19:06:39 +00:00
fi
fi
2008-09-07 14:41:36 +00:00
if [ " ${ LH_BOOTLOADER } " = "syslinux" ]
then
2009-01-14 18:26:34 -01:00
# syslinux + fat
2008-09-07 14:41:36 +00:00
case " ${ LH_BINARY_FILESYSTEM } " in
fat*)
; ;
*)
2009-01-15 00:38:34 -01:00
Echo_warning "You have selected values of LH_BOOTLOADER and LH_BINARY_FILESYSTEM which are incompatible - syslinux only supports FAT filesystems."
2008-09-07 14:41:36 +00:00
; ;
esac
fi
2009-01-14 18:30:21 -01:00
2010-02-18 15:12:59 -01:00
case " ${ LH_BINARY_IMAGES } " in
usb*)
# grub or yaboot + usb
case " ${ LH_BOOTLOADER } " in
grub| yaboot)
2010-09-02 11:22:22 +00:00
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."
2010-02-18 15:12:59 -01:00
exit 1
; ;
esac
; ;
esac
2009-02-18 17:21:49 -01:00
2009-11-01 09:42:25 -01:00
if [ " $( echo ${ LH_ISO_APPLICATION } | wc -c) " -gt 128 ]
2009-02-18 17:21:49 -01:00
then
2009-02-21 22:17:38 -01:00
Echo_warning "You have specified a value of LH_ISO_APPLICATION that is too long; the maximum length is 128 characters."
2009-02-18 17:21:49 -01:00
fi
2009-11-01 09:42:25 -01:00
if [ " $( echo ${ LH_ISO_PREPARER } | wc -c) " -gt 128 ]
2009-02-18 17:21:49 -01:00
then
2009-02-21 22:17:38 -01:00
Echo_warning "You have specified a value of LH_ISO_PREPARER that is too long; the maximum length is 128 characters."
2009-02-18 17:21:49 -01:00
fi
2009-11-01 09:42:25 -01:00
if [ " $( echo ${ LH_ISO_PUBLISHER } | wc -c) " -gt 128 ]
2009-02-18 17:21:49 -01:00
then
2009-02-21 22:17:38 -01:00
Echo_warning "You have specified a value of LH_ISO_PUBLISHER that is too long; the maximum length is 128 characters."
2009-02-18 17:21:49 -01:00
fi
2009-11-01 09:42:25 -01:00
if [ " $( eval " echo ${ LH_ISO_VOLUME } " | wc -c) " -gt 32 ]
2009-02-18 17:21:49 -01:00
then
2009-02-21 22:17:38 -01:00
Echo_warning "You have specified a value of LH_ISO_VOLUME that is too long; the maximum length is 32 characters."
2009-02-18 17:21:49 -01:00
fi
2009-05-09 21:36:30 +00:00
if echo ${ LH_PACKAGES_LISTS } | grep -qs -E "(stripped|minimal)\b"
then
2009-12-13 19:17:45 -01:00
if [ " ${ LH_BINARY_INDICES } " = "true" ]
2009-05-09 21:36:30 +00:00
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."
fi
fi
2007-11-11 12:14:25 -01:00
}