refactor: enhance cleanup process in Jenkinsfile and build-liveiso.sh
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user