Update util-mount.sh

This commit is contained in:
Philip Müller 2021-07-19 22:51:29 +00:00
parent 7d4a0081d4
commit 6cbf8f7f02

View file

@ -114,8 +114,6 @@ chroot_mount_partitions(){
chroot_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 &&
chroot_mount tmp "$1/tmp" -t tmpfs -o mode=1777,strictatime,nodev,nosuid
chroot_mount /etc/resolv.conf "$1/etc/resolv.conf" --bind
info "chroot_mount: active mounts [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
info "chroot_mount: active part mounts [%s]" "${CHROOT_ACTIVE_PART_MOUNTS[@]}"
}
chroot_mount() {
@ -145,7 +143,6 @@ chroot_api_efi_mount() {
chroot_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev &&
chroot_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 &&
chroot_mount tmp "$1/tmp" -t tmpfs -o mode=1777,strictatime,nodev,nosuid
info "api_efi_mount: active mounts [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
}
chroot_api_mount() {
@ -161,29 +158,22 @@ chroot_api_mount() {
chroot_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev &&
chroot_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 &&
chroot_mount tmp "$1/tmp" -t tmpfs -o mode=1777,strictatime,nodev,nosuid
info "api_mount: active mounts [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
}
chroot_part_umount() {
info "part_umount: active mounts [%s]" "${CHROOT_ACTIVE_PART_MOUNTS}"
mount
info "part_umount: [%s]" "${CHROOT_ACTIVE_PART_MOUNTS[@]}"
info "umount: [%s]" "${CHROOT_ACTIVE_PART_MOUNTS[@]}"
umount "${CHROOT_ACTIVE_PART_MOUNTS[@]}"
unset CHROOT_ACTIVE_PART_MOUNTS
}
chroot_api_umount() {
info "api_umount: active mounts [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
mount
info "api_umount: [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
info "umount: [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
unset CHROOT_ACTIVE_MOUNTS
}
chroot_api_efi_umount() {
info "api_efi_umount: active mounts [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
mount
info "api_efi_umount: [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
chroot_api_efi_umount() {
info "umount: [%s]" "${CHROOT_ACTIVE_MOUNTS[@]}"
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
unset CHROOT_ACTIVE_MOUNTS
}