V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -13,23 +13,33 @@
|
||||
guard_sourcing
|
||||
|
||||
#######################################
|
||||
# Exiting chroot.
|
||||
# Exiting chroot of the target system.
|
||||
# Globals:
|
||||
# TARGET
|
||||
# VAR_NEED_RUN_IN_TARGET
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# 0: on success
|
||||
#######################################
|
||||
exiting_chroot_system() {
|
||||
umount -lf "${TARGET}/proc"
|
||||
do_log "info" "file_only" "'umount -lf ${TARGET}/proc'."
|
||||
umount -lf "${TARGET}/sys"
|
||||
do_log "info" "file_only" "'umount -lf ${TARGET}/sys'."
|
||||
umount -lf "${TARGET}/dev"
|
||||
do_log "info" "file_only" "'umount -lf ${TARGET}/dev'."
|
||||
umount -lf "${TARGET}/run"
|
||||
do_log "info" "file_only" "'umount -lf ${TARGET}/run'."
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare -a ary_umount=( "/sys/fs/cgroup" "/dev/hugepages" "/dev/mqueue" "/dev/shm" "/dev/pts" "/proc" "/sys" "/dev" )
|
||||
declare var_path=""
|
||||
|
||||
for var_path in "${ary_umount[@]}"; do
|
||||
|
||||
umount -l "${TARGET}${var_path}" 2>/dev/null || true
|
||||
do_log "info" "file_only" "4999() Command: [umount -l ${TARGET}${var_path} 2>/dev/null || true] issued."
|
||||
|
||||
done
|
||||
|
||||
if [[ "${VAR_NEED_RUN_IN_TARGET:-false}" == "true" ]]; then
|
||||
|
||||
umount -l "${TARGET}/run" 2>/dev/null || true
|
||||
do_log "info" "file_only" "4999() Command: [umount -l ${TARGET}/run 2>/dev/null || true] issued."
|
||||
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user