summaryrefslogtreecommitdiff
path: root/auto
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2012-11-09 15:41:33 +0100
committerAndreas Loibl <andreas@andreas-loibl.de>2012-11-09 15:41:33 +0100
commit3c071f6ff60e6fd5afde17d113beb50f1e246422 (patch)
tree2fcff4f5deee5d55b402f6dfbb35f31d835452c6 /auto
parent919e5d202ca3c34518d6ff6c22299dd41a5fdcb6 (diff)
downloadkanotix-3c071f6ff60e6fd5afde17d113beb50f1e246422.zip
kanotix-3c071f6ff60e6fd5afde17d113beb50f1e246422.tar.gz
improved compat functions
Diffstat (limited to 'auto')
-rwxr-xr-xauto/config12
-rw-r--r--auto/functions/compat28
2 files changed, 24 insertions, 16 deletions
diff --git a/auto/config b/auto/config
index 74de21f..fc9de9c 100755
--- a/auto/config
+++ b/auto/config
@@ -39,17 +39,9 @@ lb config noauto \
--mirror-binary ${MIRROR_BINARY} \
--mirror-binary-security ${MIRROR_BINARY_SECURITY} \
--binary-indices true \
- "${@}" || exit $?
-
-# hostname and username are configured in config/chroot_local-includes/etc/live/config.conf
-#lb config noauto \
-# --hostname Kanotix \
-# --username kanotix \
-
-# disable firmware packages (needed for newer lb versions)
-lb config noauto \
--firmware-binary false \
- --firmware-chroot false
+ --firmware-chroot false \
+ "${@}" || exit $?
. config/binary
. config/bootstrap
diff --git a/auto/functions/compat b/auto/functions/compat
index c3c1c3b..e93c386 100644
--- a/auto/functions/compat
+++ b/auto/functions/compat
@@ -17,20 +17,34 @@ Compat_arguments ()
# ignore other unsupported arguments
--syslinux-*|--bootstrap-config|-e|--encryption|-l|--language) shift; continue;;
--binary-indices|--packages|--symlinks|--sysvinit|--tasks|--virtual-root-size) shift; continue;;
- --packages-lists|--package-lists|-p) Compat_packagelists $1; shift; continue;;
+ --packages-lists|--package-lists|-p) shift; continue;;
esac
echo -n "$arg$IFS"
done
}
+Compat_arguments_functions ()
+{
+ while [ "$#" -gt 0 ]
+ do
+ arg="$1"
+ shift
+ case "$arg" in
+ --packages-lists|--package-lists|-p) Compat_packagelists $1; shift; continue;;
+ esac
+ done
+}
+
Compat_config ()
{
-[ -e config/chroot ] && [ "$LB_ARCHIVES" ] && cat <<eof >> config/chroot
+if [ -e config/chroot ]; then
+cat <<eof >> config/chroot
# Compat (Live-build 2 -> 3)
-LB_REPOSITORIES="$LB_ARCHIVES"
-LB_PACKAGES_LISTS="$LB_PACKAGE_LISTS"
eof
+ [ "$LB_ARCHIVES" ] && echo "LB_REPOSITORIES=\"$LB_ARCHIVES\"" >> config/chroot
+ [ "$LB_PACKAGE_LISTS" ] && echo "LB_PACKAGE_LISTS=\"$LB_PACKAGE_LISTS\";LB_PACKAGES_LISTS=\"$LB_PACKAGE_LISTS\"" >> config/chroot
+fi
[ -e config/bootstrap ] && [ "$LB_ARCHITECTURES" ] && cat <<eof >> config/bootstrap
# Compat (Live-build 2 -> 3)
@@ -67,8 +81,8 @@ Compat_dir ()
Compat_packagelists()
{
- LB_PACKAGE_LISTS="$1"
- LB_PACKAGES_LISTS="$1"
+ LB_PACKAGE_LISTS="$@"
+ LB_PACKAGES_LISTS="$@"
mkdir -p config/package-lists
(
echo '# AUTOGENERATED from "lb config -p" option - DO NOT CHANGE'
@@ -102,6 +116,7 @@ case "$LB_VERSION" in
auto/config "$@"
exit $?
fi
+ Compat_arguments_functions "$@"
OIFS="$IFS"; IFS="$(printf \\a)"
set -- $(Compat_arguments "$@")
IFS="$OIFS"
@@ -111,6 +126,7 @@ case "$LB_VERSION" in
LB_PACKAGES_LISTS="$LB_PACKAGE_LISTS"
[ -z "$LB_ARCHITECTURES" ] && LB_ARCHITECTURES="$LB_ARCHITECTURE"
LB_ARCHITECTURE="$LB_ARCHITECTURES"
+ Compat_config || :
trap Compat_config EXIT
;;
chroot_apt)