[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 1/4] Add support to override helpers base directory



From: Otavio Salvador <otavio at ossystems.com.br>

An environment variable named 'LH_BASE' that can be use to override
 the base for all importing and reading operations.

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---

 functions/defaults.sh                 |    4 ++--
 helpers/lh_binary                     |    2 +-
 helpers/lh_binary_chroot              |    2 +-
 helpers/lh_binary_debian-installer    |    2 +-
 helpers/lh_binary_encryption          |    2 +-
 helpers/lh_binary_grub                |    2 +-
 helpers/lh_binary_hdd                 |    2 +-
 helpers/lh_binary_includes            |    2 +-
 helpers/lh_binary_iso                 |    2 +-
 helpers/lh_binary_linux-image         |    2 +-
 helpers/lh_binary_local-includes      |    2 +-
 helpers/lh_binary_manifest            |    2 +-
 helpers/lh_binary_md5sum              |    2 +-
 helpers/lh_binary_memtest             |    2 +-
 helpers/lh_binary_net                 |    2 +-
 helpers/lh_binary_rootfs              |    2 +-
 helpers/lh_binary_syslinux            |    2 +-
 helpers/lh_binary_usb-hdd             |    2 +-
 helpers/lh_binary_yaboot              |    2 +-
 helpers/lh_bootstrap                  |    2 +-
 helpers/lh_bootstrap_cdebootstrap     |    2 +-
 helpers/lh_bootstrap_debootstrap      |    2 +-
 helpers/lh_build                      |    2 +-
 helpers/lh_chroot                     |    2 +-
 helpers/lh_chroot_apt                 |    2 +-
 helpers/lh_chroot_debianchroot        |    2 +-
 helpers/lh_chroot_hacks               |    2 +-
 helpers/lh_chroot_hooks               |    6 +++---
 helpers/lh_chroot_hosts               |    2 +-
 helpers/lh_chroot_interactive         |    2 +-
 helpers/lh_chroot_linux-image         |    2 +-
 helpers/lh_chroot_local-hooks         |    2 +-
 helpers/lh_chroot_local-includes      |    2 +-
 helpers/lh_chroot_local-packages      |    2 +-
 helpers/lh_chroot_local-packageslists |    2 +-
 helpers/lh_chroot_localization        |    2 +-
 helpers/lh_chroot_packages            |    2 +-
 helpers/lh_chroot_packageslists       |    6 +++---
 helpers/lh_chroot_proc                |    2 +-
 helpers/lh_chroot_resolv              |    2 +-
 helpers/lh_chroot_sources             |    2 +-
 helpers/lh_chroot_symlinks            |    2 +-
 helpers/lh_chroot_sysfs               |    2 +-
 helpers/lh_chroot_sysvinit            |    2 +-
 helpers/lh_chroot_sysvrc              |    2 +-
 helpers/lh_chroot_tasks               |    2 +-
 helpers/lh_clean                      |    2 +-
 helpers/lh_config                     |    8 ++++----
 helpers/lh_losetup                    |    2 +-
 helpers/lh_source                     |    2 +-
 helpers/lh_source_debian              |    2 +-
 helpers/lh_source_debian-live         |    2 +-
 helpers/lh_source_generic             |    2 +-
 helpers/lh_source_hdd                 |    2 +-
 helpers/lh_source_iso                 |    2 +-
 helpers/lh_source_md5sum              |    2 +-
 helpers/lh_source_net                 |    2 +-
 helpers/lh_source_usb-hdd             |    2 +-
 helpers/lh_testroot                   |    2 +-
 helpers/make-live                     |    2 +-
 60 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/functions/defaults.sh b/functions/defaults.sh
index c66ea53..fb81fd4 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -232,13 +232,13 @@ Set_defaults ()
 	# Setting includes
 	if [ -z "${LIVE_INCLUDES}" ]
 	then
-		LIVE_INCLUDES="/usr/share/live-helper/includes"
+		LIVE_INCLUDES="${LH_BASE-:/usr/share/live-helper}/includes"
 	fi
 
 	# Setting templates
 	if [ -z "${LIVE_TEMPLATES}" ]
 	then
-		LIVE_TEMPLATES="/usr/share/live-helper/templates"
+		LIVE_TEMPLATES="${LH_BASE-:/usr/share/live-helper}/templates"
 	fi
 
 	# Setting live helper options
diff --git a/helpers/lh_binary b/helpers/lh_binary
index b4205e3..b61838a 100755
--- a/helpers/lh_binary
+++ b/helpers/lh_binary
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 2314959..0b3f890 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index f789e1d..4408de1 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption
index 4071097..6f4f84c 100755
--- a/helpers/lh_binary_encryption
+++ b/helpers/lh_binary_encryption
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index bcec98a..4175472 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_hdd b/helpers/lh_binary_hdd
index 6817e61..e109241 100755
--- a/helpers/lh_binary_hdd
+++ b/helpers/lh_binary_hdd
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes
index 1764746..5a4803a 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso
index 56f6178..4deab5e 100755
--- a/helpers/lh_binary_iso
+++ b/helpers/lh_binary_iso
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_linux-image b/helpers/lh_binary_linux-image
index c47a4d1..ea15f26 100755
--- a/helpers/lh_binary_linux-image
+++ b/helpers/lh_binary_linux-image
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_local-includes b/helpers/lh_binary_local-includes
index 189636f..c5dbec1 100755
--- a/helpers/lh_binary_local-includes
+++ b/helpers/lh_binary_local-includes
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_manifest b/helpers/lh_binary_manifest
index b625b75..f184ede 100755
--- a/helpers/lh_binary_manifest
+++ b/helpers/lh_binary_manifest
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_md5sum b/helpers/lh_binary_md5sum
index 079c56a..f697af8 100755
--- a/helpers/lh_binary_md5sum
+++ b/helpers/lh_binary_md5sum
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_memtest b/helpers/lh_binary_memtest
index 5753a03..46c3513 100755
--- a/helpers/lh_binary_memtest
+++ b/helpers/lh_binary_memtest
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 64c909f..7c72e27 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index d60bf9b..30f49f0 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 1a75b77..a43d220 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd
index 332646e..b10714b 100755
--- a/helpers/lh_binary_usb-hdd
+++ b/helpers/lh_binary_usb-hdd
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot
index c444ad6..a19cc88 100755
--- a/helpers/lh_binary_yaboot
+++ b/helpers/lh_binary_yaboot
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_bootstrap b/helpers/lh_bootstrap
index f35c900..9e926f9 100755
--- a/helpers/lh_bootstrap
+++ b/helpers/lh_bootstrap
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. "${FUNCTION}"
 done
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index d2a773b..4cd4f03 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. "${FUNCTION}"
 done
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap
index 3256d89..b347e17 100755
--- a/helpers/lh_bootstrap_debootstrap
+++ b/helpers/lh_bootstrap_debootstrap
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_build b/helpers/lh_build
index e233125..a3a7a33 100755
--- a/helpers/lh_build
+++ b/helpers/lh_build
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. "${FUNCTION}"
 done
diff --git a/helpers/lh_chroot b/helpers/lh_chroot
index a597457..39ba9c4 100755
--- a/helpers/lh_chroot
+++ b/helpers/lh_chroot
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index 4651b9b..316405a 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_debianchroot b/helpers/lh_chroot_debianchroot
index 33aa0cb..2f3e77d 100755
--- a/helpers/lh_chroot_debianchroot
+++ b/helpers/lh_chroot_debianchroot
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index 6d3605d..ae6d9f7 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks
index ef4dc0f..d4157b2 100755
--- a/helpers/lh_chroot_hooks
+++ b/helpers/lh_chroot_hooks
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
@@ -47,10 +47,10 @@ Create_lockfile .lock
 # Processing hooks
 for HOOK in ${LIVE_PACKAGES_LISTS} ${LIVE_TASKS}
 do
-	if [ -f /usr/share/live-helper/hooks/"${HOOK}" ]
+	if [ -f ${LH_BASE-:/usr/share/live-helper}/hooks/"${HOOK}" ]
 	then
 		# Copying hook
-		cp /usr/share/live-helper/hooks/"${HOOK}" chroot/root
+		cp ${LH_BASE-:/usr/share/live-helper}/hooks/"${HOOK}" chroot/root
 
 		# Making hook executable
 		if [ ! -x chroot/root/"${HOOK}" ]
diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts
index e471ca0..47c720c 100755
--- a/helpers/lh_chroot_hosts
+++ b/helpers/lh_chroot_hosts
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_interactive b/helpers/lh_chroot_interactive
index cc82156..fa68f20 100755
--- a/helpers/lh_chroot_interactive
+++ b/helpers/lh_chroot_interactive
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_linux-image b/helpers/lh_chroot_linux-image
index 4ffc4da..d66bc49 100755
--- a/helpers/lh_chroot_linux-image
+++ b/helpers/lh_chroot_linux-image
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_local-hooks b/helpers/lh_chroot_local-hooks
index 1ccadca..a0633de 100755
--- a/helpers/lh_chroot_local-hooks
+++ b/helpers/lh_chroot_local-hooks
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_local-includes b/helpers/lh_chroot_local-includes
index 417908c..0f89c07 100755
--- a/helpers/lh_chroot_local-includes
+++ b/helpers/lh_chroot_local-includes
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_local-packages b/helpers/lh_chroot_local-packages
index 923751d..6401f93 100755
--- a/helpers/lh_chroot_local-packages
+++ b/helpers/lh_chroot_local-packages
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_local-packageslists b/helpers/lh_chroot_local-packageslists
index d67bfa3..e46ce57 100755
--- a/helpers/lh_chroot_local-packageslists
+++ b/helpers/lh_chroot_local-packageslists
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_localization b/helpers/lh_chroot_localization
index 0831c10..8f5f242 100755
--- a/helpers/lh_chroot_localization
+++ b/helpers/lh_chroot_localization
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_packages b/helpers/lh_chroot_packages
index bbe58c0..124270b 100755
--- a/helpers/lh_chroot_packages
+++ b/helpers/lh_chroot_packages
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_packageslists b/helpers/lh_chroot_packageslists
index 916b152..4d3af15 100755
--- a/helpers/lh_chroot_packageslists
+++ b/helpers/lh_chroot_packageslists
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
@@ -51,10 +51,10 @@ then
 
 	for LIST in ${LIVE_PACKAGES_LISTS}
 	do
-		if [ -f /usr/share/live-helper/lists/"${LIST}" ]
+		if [ -f ${LH_BASE-:/usr/share/live-helper}/lists/"${LIST}" ]
 		then
 			# Copying package list
-			grep -v "^#" /usr/share/live-helper/lists/"${LIST}" > chroot/root/"${LIST}"
+			grep -v "^#" ${LH_BASE-:/usr/share/live-helper}/lists/"${LIST}" > chroot/root/"${LIST}"
 
 			# Installing package list
 			case "${LH_APT}" in
diff --git a/helpers/lh_chroot_proc b/helpers/lh_chroot_proc
index 8364130..376fc37 100755
--- a/helpers/lh_chroot_proc
+++ b/helpers/lh_chroot_proc
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv
index 08a41fc..42e562d 100755
--- a/helpers/lh_chroot_resolv
+++ b/helpers/lh_chroot_resolv
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 5f1669d..83e7206 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_symlinks b/helpers/lh_chroot_symlinks
index f6dc543..904c186 100755
--- a/helpers/lh_chroot_symlinks
+++ b/helpers/lh_chroot_symlinks
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs
index bbb8b76..0a30e1f 100755
--- a/helpers/lh_chroot_sysfs
+++ b/helpers/lh_chroot_sysfs
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_sysvinit b/helpers/lh_chroot_sysvinit
index 54d43f7..f2d37ef 100755
--- a/helpers/lh_chroot_sysvinit
+++ b/helpers/lh_chroot_sysvinit
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_sysvrc b/helpers/lh_chroot_sysvrc
index 95f2ccf..78a2b20 100755
--- a/helpers/lh_chroot_sysvrc
+++ b/helpers/lh_chroot_sysvrc
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_chroot_tasks b/helpers/lh_chroot_tasks
index 22af6b4..86e6653 100755
--- a/helpers/lh_chroot_tasks
+++ b/helpers/lh_chroot_tasks
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_clean b/helpers/lh_clean
index 541db13..e0ca040 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_config b/helpers/lh_config
index d2d25ab..e99ea44 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
@@ -26,15 +26,15 @@ CONFIG="${1}"
 
 if [ -n "${LH_CONFIG}" ]
 then
-	if [ -d /usr/share/live-helper/configs/"${LH_CONFIG}" ]
+	if [ -d ${LH_BASE-:/usr/share/live-helper}/configs/"${LH_CONFIG}" ]
 	then
 		mkdir "${LH_CONFIG}"
-		cp -r /usr/share/live-helper/configs/"${LH_CONFIG}" "${LH_CONFIG}"/config
+		cp -r ${LH_BASE-:/usr/share/live-helper}/configs/"${LH_CONFIG}" "${LH_CONFIG}"/config
 
 		LIVE_ROOT="${LH_CONFIG}"
 		CONFIG=""
 	else
-		Echo_error "Couldn't find config ${LH_CONFIG} in /usr/share/live-helper/configs/."
+		Echo_error "Couldn't find config ${LH_CONFIG} in ${LH_BASE-:/usr/share/live-helper}/configs/."
 	fi
 fi
 
diff --git a/helpers/lh_losetup b/helpers/lh_losetup
index c585679..7840d5b 100755
--- a/helpers/lh_losetup
+++ b/helpers/lh_losetup
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source b/helpers/lh_source
index 9d7f1ff..d5c7494 100755
--- a/helpers/lh_source
+++ b/helpers/lh_source
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian
index 1ab8972..154c30e 100755
--- a/helpers/lh_source_debian
+++ b/helpers/lh_source_debian
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live
index f074b78..7df8f3e 100755
--- a/helpers/lh_source_debian-live
+++ b/helpers/lh_source_debian-live
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_generic b/helpers/lh_source_generic
index 98bb1ab..991e618 100755
--- a/helpers/lh_source_generic
+++ b/helpers/lh_source_generic
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_hdd b/helpers/lh_source_hdd
index c678838..b3096c0 100755
--- a/helpers/lh_source_hdd
+++ b/helpers/lh_source_hdd
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_iso b/helpers/lh_source_iso
index 963bb82..77149ff 100755
--- a/helpers/lh_source_iso
+++ b/helpers/lh_source_iso
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_md5sum b/helpers/lh_source_md5sum
index 2acd1d0..ac80f3d 100755
--- a/helpers/lh_source_md5sum
+++ b/helpers/lh_source_md5sum
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_net b/helpers/lh_source_net
index a59a08b..0a869bd 100755
--- a/helpers/lh_source_net
+++ b/helpers/lh_source_net
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_source_usb-hdd b/helpers/lh_source_usb-hdd
index 375d65a..9f41561 100755
--- a/helpers/lh_source_usb-hdd
+++ b/helpers/lh_source_usb-hdd
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/lh_testroot b/helpers/lh_testroot
index bd94947..a99f666 100755
--- a/helpers/lh_testroot
+++ b/helpers/lh_testroot
@@ -10,7 +10,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
 	. ${FUNCTION}
 done
diff --git a/helpers/make-live b/helpers/make-live
index a1aa8a1..962ba0d 100755
--- a/helpers/make-live
+++ b/helpers/make-live
@@ -23,7 +23,7 @@
 set -e
 
 # Including common functions
-for FUNCTION in /usr/share/live-helper/functions/*.sh
+for FUNCTION in ${LH_BASE-:/usr/share/live-helper}/functions/*.sh
 do
         . ${FUNCTION}
 done




Reply to: