This commit is contained in:
Marc Beninca 2024-11-25 12:50:43 +01:00
parent 6b8da7e16b
commit 0b2b2acb7b
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,3 +1,25 @@
obm() { a__overlay_bind_mount "${@}"; }
a__overlay_bind_mount() {
local directory
for directory in "dev" "dev/pts" "proc" "sys"; do
if ! mount --bind "/${directory}" "overlay/mount/${directory}"; then
sh_log_error "Unable to bind mount directory: ${directory}"
return 1
fi
done
}
obu() { a__overlay_bind_unmount "${@}"; }
a__overlay_bind_unmount() {
local directory
for directory in "sys" "proc" "dev/pts" "dev"; do
if ! umount --lazy "overlay/mount/${directory}"; then
sh_log_error "Unable to bind unmount directory: ${directory}"
return 1
fi
done
}
orm() { a__overlay_root_mount "${@}"; }
a__overlay_root_mount() {
local root="${1}"
@ -74,17 +96,6 @@ a__overlay_root_unmount() {
fi
}
obm() { a__overlay_bind_mount "${@}"; }
a__overlay_bind_mount() {
local directory
for directory in "dev" "dev/pts" "proc" "sys"; do
if ! mount --bind "/${directory}" "overlay/mount/${directory}"; then
sh_log_error "Unable to bind mount directory: ${directory}"
return 1
fi
done
}
ocr() { a__overlay_command_root "${@}"; }
a__overlay_command_root() {
chroot \
@ -98,17 +109,6 @@ a__overlay_command_user() {
"overlay/mount" "${@}"
}
obu() { a__overlay_bind_unmount "${@}"; }
a__overlay_bind_unmount() {
local directory
for directory in "sys" "proc" "dev/pts" "dev"; do
if ! umount --lazy "overlay/mount/${directory}"; then
sh_log_error "Unable to bind unmount directory: ${directory}"
return 1
fi
done
}
omm() { a__overlay_mirror_mount "${@}"; }
a__overlay_mirror_mount() {
mount --make-rslave --rbind "/deb" "overlay/mount/deb"