diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-04-02 20:23:57 +0100 |
---|---|---|
committer | Lyndon Brown <jnqnfe@gmail.com> | 2020-04-23 18:26:15 +0100 |
commit | d79c96232b40fb082233c97ac8d4f75b821ecefe (patch) | |
tree | 0d14ed516433176a321b72cf53fb25981720ac1d /scripts | |
parent | 500f2050739e8cb902d710d1ae6b3f5de4d00dcd (diff) | |
download | vyos-live-build-d79c96232b40fb082233c97ac8d4f75b821ecefe.tar.gz vyos-live-build-d79c96232b40fb082233c97ac8d4f75b821ecefe.zip |
stagefiles: guard unnecessary chroot removal
just as most scripts are skipped if their stagefile exists (indicating
that they have already been run to completion), including chroot
preparation scripts in install mode, this implements the same guard for
chroot prep remove mode, such that they exit early if their stagefile
does not exist, indicating that the modification has already been removed.
(also override-able by --force in the same way).
this basically just uses a tweaked copy of Check_stagefile().
Gbp-Dch: Short
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/chroot_apt | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_debianchroot | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_devpts | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_dpkg | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_hostname | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_hosts | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_proc | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_resolv | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_selinuxfs | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_sysfs | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_sysv-rc | 3 | ||||
-rwxr-xr-x | scripts/build/chroot_tmpfs | 3 |
12 files changed, 36 insertions, 0 deletions
diff --git a/scripts/build/chroot_apt b/scripts/build/chroot_apt index 6d974f1b5..ad5c54816 100755 --- a/scripts/build/chroot_apt +++ b/scripts/build/chroot_apt @@ -147,6 +147,9 @@ case "${1}" in remove) Echo_message "Deconfiguring file /etc/apt/apt.conf" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_debianchroot b/scripts/build/chroot_debianchroot index e7f32b4f6..e534ac101 100755 --- a/scripts/build/chroot_debianchroot +++ b/scripts/build/chroot_debianchroot @@ -50,6 +50,9 @@ case "${1}" in remove) Echo_message "Deconfiguring file /etc/debian_chroot" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_devpts b/scripts/build/chroot_devpts index 7d55ca9e7..4a5a13a94 100755 --- a/scripts/build/chroot_devpts +++ b/scripts/build/chroot_devpts @@ -47,6 +47,9 @@ case "${1}" in remove) Echo_message "Begin unmounting /dev/pts..." + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg index 598b50075..bb734adc5 100755 --- a/scripts/build/chroot_dpkg +++ b/scripts/build/chroot_dpkg @@ -60,6 +60,9 @@ EOF remove) Echo_message "Deconfiguring file /sbin/start-stop-daemon" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_hostname b/scripts/build/chroot_hostname index a209bcfba..4509591f0 100755 --- a/scripts/build/chroot_hostname +++ b/scripts/build/chroot_hostname @@ -57,6 +57,9 @@ EOF remove) Echo_message "Deconfiguring file /etc/hostname" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_hosts b/scripts/build/chroot_hosts index 27090f05f..a311a2eee 100755 --- a/scripts/build/chroot_hosts +++ b/scripts/build/chroot_hosts @@ -61,6 +61,9 @@ EOF remove) Echo_message "Deconfiguring file /etc/hosts" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_proc b/scripts/build/chroot_proc index 3a9aba57f..012510dd8 100755 --- a/scripts/build/chroot_proc +++ b/scripts/build/chroot_proc @@ -47,6 +47,9 @@ case "${1}" in remove) Echo_message "Begin unmounting /proc..." + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_resolv b/scripts/build/chroot_resolv index 1918856cc..25da6d549 100755 --- a/scripts/build/chroot_resolv +++ b/scripts/build/chroot_resolv @@ -64,6 +64,9 @@ case "${1}" in remove) Echo_message "Deconfiguring file /etc/resolv.conf" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_selinuxfs b/scripts/build/chroot_selinuxfs index 2916679d6..8c9944931 100755 --- a/scripts/build/chroot_selinuxfs +++ b/scripts/build/chroot_selinuxfs @@ -50,6 +50,9 @@ case "${1}" in remove) Echo_message "Begin unmounting /sys/fs/selinux..." + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_sysfs b/scripts/build/chroot_sysfs index 070dd6eda..e6e26a35e 100755 --- a/scripts/build/chroot_sysfs +++ b/scripts/build/chroot_sysfs @@ -47,6 +47,9 @@ case "${1}" in remove) Echo_message "Begin unmounting /sys..." + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_sysv-rc b/scripts/build/chroot_sysv-rc index bcf86a74d..971cd0937 100755 --- a/scripts/build/chroot_sysv-rc +++ b/scripts/build/chroot_sysv-rc @@ -56,6 +56,9 @@ EOF remove) Echo_message "Deconfiguring file /usr/sbin/policy-rc.d" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile diff --git a/scripts/build/chroot_tmpfs b/scripts/build/chroot_tmpfs index ae1d0f82c..c5f69ed50 100755 --- a/scripts/build/chroot_tmpfs +++ b/scripts/build/chroot_tmpfs @@ -52,6 +52,9 @@ case "${1}" in remove) Echo_message "Deconfiguring tmpfs for /var/lib/dpkg" + # Checking stage file + Ensure_stagefile_exists + # Acquire lock file Acquire_lockfile |