summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/config43
1 files changed, 17 insertions, 26 deletions
diff --git a/scripts/build/config b/scripts/build/config
index 3a79c9f88..7f19aaeb2 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -1345,33 +1345,24 @@ do
fi
done
-if [ ! -e config/package-lists/live.list.chroot ]
-then
- case "${LB_INITRAMFS}" in
- live-boot)
- echo "live-boot" > config/package-lists/live.list.chroot
- echo "live-config" >> config/package-lists/live.list.chroot
-
- case "${LB_INITSYSTEM}" in
- none)
- # do nothing
- ;;
-
- systemd)
- echo "live-config-systemd" >> config/package-lists/live.list.chroot
- ;;
-
- sysvinit)
- echo "live-config-${LB_INITSYSTEM}" >> config/package-lists/live.list.chroot
- echo "sysvinit-core" >> config/package-lists/live.list.chroot
- ;;
- esac
- ;;
-
- *)
- ;;
-esac
+LIVE_PKG_LIST="config/package-lists/live.list.chroot"
+if [ ! -e "${LIVE_PKG_LIST}" ]; then
+ NEEDED_PACKAGES=""
+ if [ "${LB_INITRAMFS}" = "live-boot" ]; then
+ NEEDED_PACKAGES="live-boot live-config"
+ case "${LB_INITSYSTEM}" in
+ systemd)
+ NEEDED_PACKAGES="${NEEDED_PACKAGES} live-config-systemd"
+ ;;
+ sysvinit)
+ NEEDED_PACKAGES="${NEEDED_PACKAGES} live-config-sysvinit sysvinit-core"
+ ;;
+ esac
+ fi
+ for PKG in $NEEDED_PACKAGES; do
+ echo "${PKG}" >> "${LIVE_PKG_LIST}"
+ done
fi
# Remove empty directories (if user has requested via --clean)