LANGUAGES = $(shell cd manpages/po && ls)
-SCRIPTS = bin/* initramfs-tools/hooks/* initramfs-tools/scripts/live initramfs-tools/scripts/live-functions initramfs-tools/scripts/*/* scripts/*.sh scripts/*/*
+SCRIPTS = bin/* initramfs-tools/hooks/* initramfs-tools/scripts/live initramfs-tools/scripts/*/* scripts/*.sh scripts/*/*
all: build
copy_exec /usr/share/live-boot/live-reconfigure /bin
copy_exec /usr/share/live-boot/live-preseed /bin
-# Scripts
-cp /usr/share/initramfs-tools/scripts/live-functions "${DESTDIR}"/scripts
-
# klibc dependencies
for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr*
do
exit 0
fi
-. /scripts/live-functions
+# FIXME: stop hardcoding overloading of initramfs-tools functions
+. /scripts/functions
+. /lib/live/boot/initramfs-tools.sh
# live-boot script
;;
esac
-. /scripts/live-functions
+# FIXME: stop hardcoding overloading of initramfs-tools functions
+. /scripts/functions
+. /lib/live/boot/initramfs-tools.sh
if ! [ -d "/root/usr/share/live-boot" ]
then
# live-boot header
-. /scripts/live-functions
+# FIXME: stop hardcoding overloading of initramfs-tools functions
+. /scripts/functions
+. /lib/live/boot/initramfs-tools.sh
if [ -n "${NOFSTAB}" ]
then
exit 0
fi
-. /scripts/live-functions
+# FIXME: stop hardcoding overloading of initramfs-tools functions
+. /scripts/functions
+. /lib/live/boot/initramfs-tools.sh
log_begin_msg "Preconfiguring networking"
# set -e
+if [ -e /scripts/functions ]
+then
+ # initramfs-tools specific (FIXME)
+ . /scripts/functions
+fi
+
for _SCRIPT in /lib/live/boot/*
do
if [ -e "${_SCRIPT}" ]
tail -f boot.log >&7 &
tailpid="${!}"
- # Ensure 'panic' function is overridden
- . /scripts/live-functions
+ . /live.vars
Arguments
+#!/bin/sh
-. /scripts/functions
-. /live.vars
+#set -e
log_wait_msg ()
{
_log_msg "Waiting: ${@} ... \n"
}
-really_export ()
-{
- STRING="${1}"
- VALUE="$(eval echo -n \${$STRING})"
-
- if [ -f /live.vars ] && grep -sq "export ${STRING}" /live.vars
- then
- sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
- else
- echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
- fi
-
- eval export "${STRING}"="${VALUE}"
-}
-
-lang2locale() {
- langpart="${1%%_*}"
- if [ "$1" != "C" ]; then
- # Match the language code with 3rd field in languagelist
- line=$(grep -v "^#" /usr/share/live-boot/languagelist | cut -f1,3,6 -d\; | grep -v ';C$' | grep "^$langpart;")
- if [ -n "$line" ]; then
- if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
- # More than one match; try matching the
- # country as well.
- countrypart="${1#*_}"
- if [ "$countrypart" = "$1" ]; then
- countryline="$(echo "$line" | head -n1)"
- echo "${countryline##*;}"
- return
- fi
- countrypart="${countrypart%%[@.]*}"
- countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)"
- if [ "$countryline" ]; then
- echo "${countryline##*;}"
- return
- fi
- fi
- echo "${line##*;}"
- fi
- else
- echo "C"
- fi
-}
-
# Override maybe_break from scripts/functions
maybe_break()
{
#set -e
+really_export ()
+{
+ STRING="${1}"
+ VALUE="$(eval echo -n \${$STRING})"
+
+ if [ -f /live.vars ] && grep -sq "export ${STRING}" /live.vars
+ then
+ sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
+ else
+ echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
+ fi
+
+ eval export "${STRING}"="${VALUE}"
+}
+
+lang2locale() {
+ langpart="${1%%_*}"
+ if [ "$1" != "C" ]; then
+ # Match the language code with 3rd field in languagelist
+ line=$(grep -v "^#" /usr/share/live-boot/languagelist | cut -f1,3,6 -d\; | grep -v ';C$' | grep "^$langpart;")
+ if [ -n "$line" ]; then
+ if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
+ # More than one match; try matching the
+ # country as well.
+ countrypart="${1#*_}"
+ if [ "$countrypart" = "$1" ]; then
+ countryline="$(echo "$line" | head -n1)"
+ echo "${countryline##*;}"
+ return
+ fi
+ countrypart="${countrypart%%[@.]*}"
+ countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)"
+ if [ "$countryline" ]; then
+ echo "${countryline##*;}"
+ return
+ fi
+ fi
+ echo "${line##*;}"
+ fi
+ else
+ echo "C"
+ fi
+}
+
is_in_list_separator_helper () {
local sep=${1}
shift