diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:50 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | 4739146fc6c4de8b16418517bb882312c475195c (patch) | |
tree | a3c29d97d1ead4ad4fa532b1c6bfdb419f160e71 /functions | |
parent | 1863ed88740575342008ac5f694d03e944bcece2 (diff) | |
download | vyos-live-build-4739146fc6c4de8b16418517bb882312c475195c.tar.gz vyos-live-build-4739146fc6c4de8b16418517bb882312c475195c.zip |
Adding live-helper 1.0~a6-1.
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/chroot.sh | 2 | ||||
-rwxr-xr-x | functions/common.sh | 2 | ||||
-rwxr-xr-x | functions/defaults.sh | 60 | ||||
-rwxr-xr-x | functions/exit.sh | 20 |
4 files changed, 72 insertions, 12 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh index 643f08fa8..c463f66c1 100755 --- a/functions/chroot.sh +++ b/functions/chroot.sh @@ -15,5 +15,5 @@ Chroot () # Executing commands in chroot Echo_debug "Executing: ${COMMANDS}" - 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_HTTPPPROXY}" DEBIAN_FRONTEND="${LH_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LH_DEBCONF_PRIORITY}" ${COMMANDS} + 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} } diff --git a/functions/common.sh b/functions/common.sh index 61c10c137..a6e475f71 100755 --- a/functions/common.sh +++ b/functions/common.sh @@ -10,4 +10,4 @@ set -e PROGRAM="`basename ${0}`" -VERSION="1.0~a5" +VERSION="1.0~a6" diff --git a/functions/defaults.sh b/functions/defaults.sh index e22ab9319..5deaa54a2 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -16,7 +16,20 @@ Set_defaults () # Setting mode if [ -z "${LH_MODE}" ] then - LH_MODE="debian" + if [ -f /usr/bin/lsb_release ] + then + case "`lsb_release --short --id`" in + Debian) + LH_MODE="debian" + ;; + + Ubuntu) + LH_MODE="ubuntu" + ;; + esac + else + LH_MODE="debian" + fi fi # Setting package manager @@ -123,10 +136,23 @@ Set_defaults () LH_DEBCONF_PRIORITY="critical" fi + if [ -z "${LH_DEBCONF_NOWARNINGS}" ] + then + LH_DEBCONF_NOWARNINGS="yes" + fi + # Setting genisoimage if [ -z "${LH_GENISOIMAGE}" ] then - LH_GENISOIMAGE="genisoimage" + case "${LH_MODE}" in + debian) + LH_GENISOIMAGE="genisoimage" + ;; + + ubuntu) + LH_GENISOIMAGE="mkisofs" + ;; + esac fi # Setting losetup @@ -202,7 +228,7 @@ Set_defaults () then case "${LH_MODE}" in debian) - LIVE_DISTRIBUTION="sid" + LIVE_DISTRIBUTION="etch" ;; ubuntu) @@ -407,19 +433,23 @@ Set_defaults () for LIST in ${LIVE_PACKAGES_LISTS} do case "${LIST}" in + mini|minimal) + LH_APT="apt-get" + ;; + gnome-desktop) LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/gnome-desktop//'` standard-x11" - LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//'` standard laptop desktop gnome-desktop" + LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//'` standard laptop gnome-desktop desktop" ;; kde-desktop) LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/kde-desktop//'` standard-x11" - LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//'` standard laptop desktop kde-desktop" + LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//'` standard laptop kde-desktop desktop" ;; xfce-desktop) LIVE_PACKAGES_LISTS="`echo ${LIVE_PACKAGES_LISTS} | sed -e 's/xfce-desktop//'` standard-x11" - LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//'` standard laptop desktop xfce-desktop" + LIVE_TASKS="`echo ${LIVE_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//'` standard laptop xfce-desktop desktop" ;; esac done @@ -427,6 +457,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 security updates option if [ -z "${LIVE_SECURITY}" ] then @@ -491,10 +523,10 @@ Set_defaults () LIVE_FILESYSTEM="squashfs" fi - # Setting memtest86 option - if [ -z "${LIVE_MEMTEST86}" ] + # Setting memtest option + if [ -z "${LIVE_MEMTEST}" ] then - LIVE_MEMTEST86="enabled" + LIVE_MEMTEST="memtest86+" fi # Setting iso volume @@ -540,7 +572,15 @@ Set_defaults () # Setting grub if [ -z "${LIVE_BOOTLOADER}" ] then - LIVE_BOOTLOADER="syslinux" + case "${LIVE_ARCHITECTURE}" in + i386) + LIVE_BOOTLOADER="syslinux" + ;; + + powerpc) + LIVE_BOOTLOADER="yaboot" + ;; + esac fi # Setting grub splash diff --git a/functions/exit.sh b/functions/exit.sh new file mode 100755 index 000000000..ff76c3680 --- /dev/null +++ b/functions/exit.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# exit.sh - cleanup +# 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. + +set -e + +Exit () +{ + if [ "${LH_DEBUG}" = "enabled" ] + then + set | grep -e ^LH -e ^LIVE + fi + + # FIXME: Add /proc et al cleanup on failure +} |