ovl/bind
This commit is contained in:
parent
6b8da7e16b
commit
0b2b2acb7b
1 changed files with 22 additions and 22 deletions
|
@ -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 "${@}"; }
|
orm() { a__overlay_root_mount "${@}"; }
|
||||||
a__overlay_root_mount() {
|
a__overlay_root_mount() {
|
||||||
local root="${1}"
|
local root="${1}"
|
||||||
|
@ -74,17 +96,6 @@ a__overlay_root_unmount() {
|
||||||
fi
|
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 "${@}"; }
|
ocr() { a__overlay_command_root "${@}"; }
|
||||||
a__overlay_command_root() {
|
a__overlay_command_root() {
|
||||||
chroot \
|
chroot \
|
||||||
|
@ -98,17 +109,6 @@ a__overlay_command_user() {
|
||||||
"overlay/mount" "${@}"
|
"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 "${@}"; }
|
omm() { a__overlay_mirror_mount "${@}"; }
|
||||||
a__overlay_mirror_mount() {
|
a__overlay_mirror_mount() {
|
||||||
mount --make-rslave --rbind "/deb" "overlay/mount/deb"
|
mount --make-rslave --rbind "/deb" "overlay/mount/deb"
|
||||||
|
|
Loading…
Reference in a new issue