sh/bash/mount-lxc.sh

32 lines
732 B
Bash
Raw Normal View History

2023-05-09 20:02:34 +00:00
function mrc {
local container="${1}"
local f
for f in 'dev' 'dev/pts' 'proc' 'sys' ; do
mount --bind "/${f}" "overlay/mount/var/lib/lxc/${container}/squashfs-root/${f}"
done
}
function crc {
local container="${1}"
shift
chroot "overlay/mount/var/lib/lxc/${container}/squashfs-root" "${@}"
}
function urc {
local container="${1}"
for f in 'sys' 'proc' 'dev/pts' 'dev' ; do
umount --lazy "overlay/mount/var/lib/lxc/${container}/squashfs-root/${f}"
done
}
function mmc {
local container="${1}"
mount --bind '/deb' "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb"
}
function umc {
local container="${1}"
umount "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb"
}