summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_sysfs
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_sysfs
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_sysfs')
-rwxr-xr-xscripts/build/chroot_sysfs3
1 files changed, 3 insertions, 0 deletions
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