refactor: enhance cleanup process in Jenkinsfile and build-liveiso.sh

This commit is contained in:
2026-07-16 14:56:48 +02:00
parent 101237264a
commit 99cd5d10e1
2 changed files with 40 additions and 0 deletions
+10
View File
@@ -10,7 +10,17 @@ rm -rf "$WORKDIR"
mkdir -p "$ROOTFS"
mkdir -p "$ISO/live"
cleanup() {
umount -R "$ROOTFS" 2>/dev/null || true
umount -lf "$ROOTFS/dev/pts" 2>/dev/null || true
umount -lf "$ROOTFS/dev/shm" 2>/dev/null || true
umount -lf "$ROOTFS/dev" 2>/dev/null || true
umount -lf "$ROOTFS/proc" 2>/dev/null || true
umount -lf "$ROOTFS/sys" 2>/dev/null || true
}
trap cleanup EXIT
echo "=== Extracting RootFS ==="
tar --zstd -xf espos-openrc-rootfs.tar.zst -C "$ROOTFS"