summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_sysv-rc
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-04-02 20:23:57 +0100
committerLyndon Brown <jnqnfe@gmail.com>2020-04-23 18:26:15 +0100
commitd79c96232b40fb082233c97ac8d4f75b821ecefe (patch)
tree0d14ed516433176a321b72cf53fb25981720ac1d /scripts/build/chroot_sysv-rc
parent500f2050739e8cb902d710d1ae6b3f5de4d00dcd (diff)
downloadvyos-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/build/chroot_sysv-rc')
-rwxr-xr-xscripts/build/chroot_sysv-rc3
1 files changed, 3 insertions, 0 deletions
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