summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/cache.sh4
-rwxr-xr-xfunctions/common.sh2
-rwxr-xr-xfunctions/defaults.sh50
-rwxr-xr-xfunctions/stagefile.sh25
4 files changed, 59 insertions, 22 deletions
diff --git a/functions/cache.sh b/functions/cache.sh
index a80245a27..94d6bc2bc 100755
--- a/functions/cache.sh
+++ b/functions/cache.sh
@@ -13,7 +13,7 @@ Restore_cache ()
{
DIRECTORY="${1}"
- if [ "${LH_CACHE}" = "enabled" ]
+ if [ "${LH_CACHE_PACKAGES}" = "enabled" ]
then
if [ -d "${DIRECTORY}" ]
then
@@ -27,7 +27,7 @@ Save_cache ()
{
DIRECTORY="${1}"
- if [ "${LH_CACHE}" = "enabled" ]
+ if [ "${LH_CACHE_PACKAGES}" = "enabled" ]
then
# Cleaning current cache
Chroot "apt-get autoclean"
diff --git a/functions/common.sh b/functions/common.sh
index a56863859..d9642bfa0 100755
--- a/functions/common.sh
+++ b/functions/common.sh
@@ -10,4 +10,4 @@
set -e
PROGRAM="`basename ${0}`"
-VERSION="1.0~a7"
+VERSION="1.0~a8"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 433360870..0c923b60b 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -120,9 +120,19 @@ Set_defaults ()
fi
# Setting cache option
- if [ -z "${LH_CACHE}" ]
+ if [ -z "${LH_CACHE_INDICES}" ]
then
- LH_CACHE="enabled"
+ LH_CACHE_INDICES="disabled"
+ fi
+
+ if [ -z "${LH_CACHE_PACKAGES}" ]
+ then
+ LH_CACHE_PACKAGES="enabled"
+ fi
+
+ if [ -z "${LH_CACHE_STAGES}" ]
+ then
+ LH_CACHE_STAGES="bootstrap"
fi
# Setting debconf frontend
@@ -176,6 +186,12 @@ Set_defaults ()
LH_TASKSEL="aptitude"
fi
+ # Setting initramfs generator
+ if [ -z "${LH_INITRAMFS}" ]
+ then
+ LH_INITRAMFS="casper"
+ fi
+
# Setting root directory
if [ -z "${LIVE_ROOT}" ]
then
@@ -190,6 +206,18 @@ Set_defaults ()
esac
fi
+ # Setting includes
+ if [ -z "${LIVE_INCLUDES}" ]
+ then
+ LIVE_INCLUDES="/usr/share/live-helper/includes"
+ fi
+
+ # Setting templates
+ if [ -z "${LIVE_TEMPLATES}" ]
+ then
+ LIVE_TEMPLATES="/usr/share/live-helper/templates"
+ fi
+
# Setting live helper options
if [ -z "${LH_BREAKPOINTS}" ]
then
@@ -549,6 +577,12 @@ Set_defaults ()
LIVE_MEMTEST="memtest86+"
fi
+ # Setting debian-installer option
+ if [ -z "${LIVE_DEBIAN_INSTALLER}" ]
+ then
+ LIVE_DEBIAN_INSTALLER="disabled"
+ fi
+
# Setting iso volume
if [ -z "${LIVE_ISO_VOLUME}" ]
then
@@ -608,16 +642,4 @@ Set_defaults ()
# Setting syslinux splash
# LIVE_SYSLINUX_SPLASH
-
- # Setting includes
- if [ -z "${LIVE_INCLUDES}" ]
- then
- LIVE_INCLUDES="/usr/share/live-helper/includes"
- fi
-
- # Setting templates
- if [ -z "${LIVE_TEMPLATES}" ]
- then
- LIVE_TEMPLATES="/usr/share/live-helper/templates"
- fi
}
diff --git a/functions/stagefile.sh b/functions/stagefile.sh
index a570ea261..b4938ccc6 100755
--- a/functions/stagefile.sh
+++ b/functions/stagefile.sh
@@ -47,13 +47,28 @@ Create_stagefile ()
Require_stagefile ()
{
- FILE="${1}"
- NAME="`basename ${1}`"
+ FILES="${@}"
+ NUMBER="`echo ${@} | wc -w`"
- # Checking stage file
- if [ ! -f "${FILE}" ]
+ for FILE in ${FILES}
+ do
+ # Find at least one of the required stages
+ if [ -f ${FILE} ]
+ then
+ CONTINUE="true"
+ NAME="${NAME} `basename ${FILE}`"
+ fi
+ done
+
+ if [ "${CONTINUE}" != "true" ]
then
- Echo_error "${NAME} missing"
+ if [ "${NUMBER}" -gt 1 ]
+ then
+ Echo_error "one of ${NAME} is missing"
+ else
+ Echo_error "${NAME} missing"
+ fi
+
exit 1
fi
}