diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-04-01 05:22:39 +0100 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-04-23 09:38:02 +0000 |
commit | e22bd27170bba862239c41ebdd9a6f23ef865caf (patch) | |
tree | ef5e94ab59d716835f21a8e706ef80bc909e3dcc /scripts/build/installer | |
parent | fc88358b29bc353b15879d611cc25fc74ae91442 (diff) | |
download | vyos-live-build-e22bd27170bba862239c41ebdd9a6f23ef865caf.tar.gz vyos-live-build-e22bd27170bba862239c41ebdd9a6f23ef865caf.zip |
add bulk chroot preparation script execution helper
rather than explicitly running one helper after another in the major
build stages, or by hand (e.g. while testing things during development),
they can be run in bulk via this new helper. it essentially just takes a
list of helpers to run and runs them one by one.
it supports running all helpers except chroot_archives because that one
has different parameter requirements to the rest and supporting it would
make things messier.
helper scripts can either be named by their full script name or without
the 'chroot_' prefix for brevity. you can also just specify 'all' to
refer to all helpers (except chroot_archives, per above).
it automatically reverses the order of the list when run in remove mode.
Gbp-Dch: Short
Diffstat (limited to 'scripts/build/installer')
-rwxr-xr-x | scripts/build/installer | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/scripts/build/installer b/scripts/build/installer index 3054861dc..bab2a6d32 100755 --- a/scripts/build/installer +++ b/scripts/build/installer @@ -27,21 +27,9 @@ Init_config_data "${@}" # Setting up cleanup function Setup_clean_exit -if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] -then +if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then # Configuring chroot - lb chroot_devpts install "${@}" - lb chroot_proc install "${@}" - lb chroot_selinuxfs install "${@}" - lb chroot_sysfs install "${@}" - lb chroot_debianchroot install "${@}" - lb chroot_dpkg install "${@}" - lb chroot_tmpfs install "${@}" - lb chroot_sysv-rc install "${@}" - lb chroot_hosts install "${@}" - lb chroot_resolv install "${@}" - lb chroot_hostname install "${@}" - lb chroot_apt install "${@}" + lb chroot_prep install all "${@}" lb chroot_archives chroot install "${@}" fi @@ -49,22 +37,10 @@ fi lb installer_debian-installer "${@}" lb installer_preseed "${@}" -if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] -then +if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then # Deconfiguring chroot lb chroot_archives chroot remove "${@}" - lb chroot_apt remove "${@}" - lb chroot_hostname remove "${@}" - lb chroot_resolv remove "${@}" - lb chroot_hosts remove "${@}" - lb chroot_sysv-rc remove "${@}" - lb chroot_tmpfs remove "${@}" - lb chroot_dpkg remove "${@}" - lb chroot_debianchroot remove "${@}" - lb chroot_sysfs remove "${@}" - lb chroot_selinuxfs remove "${@}" - lb chroot_proc remove "${@}" - lb chroot_devpts remove "${@}" + lb chroot_prep remove all "${@}" fi Echo_message "Installer stage completed" |