summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:13 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:25 +0100
commitcd5110f6b8eb77519d704972276cfd5be6bff055 (patch)
tree3bc1bcdbff4ec3bd5a82ae34d9efed47b157e3e0 /functions
parentfdef63e60c2e68226da2fe92d6cc393c1af2b801 (diff)
downloadlive-build-cd5110f6b8eb77519d704972276cfd5be6bff055.zip
live-build-cd5110f6b8eb77519d704972276cfd5be6bff055.tar.gz
Adding live-helper 1.0~a17-1.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/architecture.sh31
-rwxr-xr-xfunctions/common.sh2
-rwxr-xr-xfunctions/defaults.sh18
-rwxr-xr-xfunctions/releases.sh23
-rwxr-xr-xfunctions/templates.sh32
-rwxr-xr-xfunctions/version.sh2
6 files changed, 97 insertions, 11 deletions
diff --git a/functions/architecture.sh b/functions/architecture.sh
new file mode 100755
index 0000000..fb0e910
--- /dev/null
+++ b/functions/architecture.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# architecture.sh - handle architecture specific support
+# Copyright (C) 2007 Otavio Salvador <otavio@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
+
+Check_architecture ()
+{
+ ARCHITECTURES="${@}"
+ VALID="false"
+
+ for ARCHITECTURE in ${ARCHITECTURES}
+ do
+ if [ "${ARCHITECTURE}" = "${LIVE_ARCHITECTURE}" ]
+ then
+ VALID="true"
+ break
+ fi
+ done
+
+ if [ "${VALID}" = "false" ]
+ then
+ Echo_warning "skipping ${0}, foreign architecture."
+ exit 0
+ fi
+}
diff --git a/functions/common.sh b/functions/common.sh
index 2c30117..a3df477 100755
--- a/functions/common.sh
+++ b/functions/common.sh
@@ -10,4 +10,4 @@
set -e
PROGRAM="`basename ${0}`"
-VERSION="1.0~a16"
+VERSION="1.0~a17"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 56dd5ae..1dacb92 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -38,7 +38,7 @@ Set_defaults ()
fi
fi
- # Setting distribution value
+ # Setting distribution name
if [ -z "${LIVE_DISTRIBUTION}" ]
then
case "${LH_MODE}" in
@@ -90,7 +90,7 @@ Set_defaults ()
LH_APT_SECURE="${LH_APT_SECURE:-enabled}"
# Setting bootstrap program
- if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "${LH_BOOTSTRAP}" ]
+ if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "`which ${LH_BOOTSTRAP}`" ]
then
case "${LH_MODE}" in
debian)
@@ -318,6 +318,9 @@ Set_defaults ()
# Setting chroot filesystem
LIVE_CHROOT_FILESYSTEM="${LIVE_CHROOT_FILESYSTEM:-squashfs}"
+ # Setting union filesystem
+ LIVE_UNION_FILESYSTEM="${LIVE_UNION_FILESYSTEM:-unionfs}"
+
# LIVE_HOOKS
# Setting interactive shell/X11/Xnest
@@ -350,7 +353,7 @@ Set_defaults ()
;;
arm)
- echo "E: You need to specify the linux kernel flavour manually on arm (FIXME)."
+ Echo_error "You need to specify the linux kernel flavour manually on arm (FIXME)."
exit 1
;;
@@ -375,7 +378,7 @@ Set_defaults ()
;;
m68k)
- LIVE_LINUX_FLAVOURS="E: You need to specify the linux kernel flavour manually on m68k."
+ LIVE_LINUX_FLAVOURS="You need to specify the linux kernel flavour manually on m68k."
exit 1
;;
@@ -401,7 +404,7 @@ Set_defaults ()
;;
*)
- echo "E: Architecture notyet supported (FIXME)"
+ Echo_error "Architecture notyet supported (FIXME)"
;;
esac
fi
@@ -411,7 +414,7 @@ Set_defaults ()
then
case "${LH_MODE}" in
debian)
- LIVE_LINUX_PACKAGES="linux-image-2.6 unionfs-modules-2.6"
+ LIVE_LINUX_PACKAGES="linux-image-2.6 ${LIVE_UNION_FILESYSTEM}-modules-2.6"
if [ "${LIVE_CHROOT_FILESYSTEM}" = "squashfs" ]
then
@@ -507,9 +510,6 @@ Set_defaults ()
# Setting debian-installer option
LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER:-disabled}"
- # Setting live-installer option
- LIVE_LIVE_INSTALLER="${LIVE_LIVE_INSTALLER:-disabled}"
-
# Setting encryption
# LIVE_ENCRYPTION
diff --git a/functions/releases.sh b/functions/releases.sh
new file mode 100755
index 0000000..d6b8225
--- /dev/null
+++ b/functions/releases.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# releases.sh - list release information
+# 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
+
+# Debian releases
+VERSION_etch="4.0 r0"
+VERSION_lenny="prereleased"
+VERSION_sid="unreleased"
+
+# Ubuntu releases
+VERSION_hoary="5.04"
+VERSION_breezy="5.10"
+VERSION_dapper="6.06 LTS"
+VERSION_edgy="6.10"
+VERSION_feisty="7.04"
+VERSION_gutsy="7.10"
diff --git a/functions/templates.sh b/functions/templates.sh
new file mode 100755
index 0000000..927c39f
--- /dev/null
+++ b/functions/templates.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# templates.sh - handle templates files
+# Copyright (C) 2007 Otavio Salvador <otavio@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
+
+Check_templates ()
+{
+ PROGRAM="${1}"
+
+ # Check local templates
+ if [ -d config/templates/"${PROGRAM}" ]
+ then
+ LIVE_TEMPLATES="config/templates"
+ fi
+
+ # Checking user templates
+ if [ ! -d "${LIVE_TEMPLATES}" ]
+ then
+ Echo_error "user specified templates not accessible in ${LIVE_TEMPLATES}"
+ exit 1
+ elif [ ! -d "${LIVE_TEMPLATES}/${PROGRAM}" ]
+ then
+ Echo_error "${PROGRAM} templates not accessible in ${LIVE_TEMPLATES}"
+ exit 1
+ fi
+}
diff --git a/functions/version.sh b/functions/version.sh
index 237531c..ef17cef 100755
--- a/functions/version.sh
+++ b/functions/version.sh
@@ -31,7 +31,7 @@ Version ()
echo "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
echo
echo "On Debian systems, the complete text of the GNU General Public License"
- echo "can be found in /usr/share/common-licenses/GPL file."
+ echo "can be found in /usr/share/common-licenses/GPL-2 file."
echo
echo "Homepage: <http://debian-live.alioth.debian.org/>"