sh/bash/mount-lxc.sh

33 lines
676 B
Bash
Raw Normal View History

2024-11-12 08:43:56 +00:00
mrc() {
2024-11-12 09:15:58 +00:00
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
2023-05-09 20:02:34 +00:00
}
2024-11-12 08:43:56 +00:00
crc() {
2024-11-12 09:15:58 +00:00
local container="${1}"
shift
chroot "overlay/mount/var/lib/lxc/${container}/squashfs-root" "${@}"
2023-05-09 20:02:34 +00:00
}
2024-11-12 08:43:56 +00:00
urc() {
2024-11-12 09:15:58 +00:00
local container="${1}"
local f
for f in "sys" "proc" "dev/pts" "dev" ; do
umount --lazy "overlay/mount/var/lib/lxc/${container}/squashfs-root/${f}"
done
2023-05-09 20:02:34 +00:00
}
2024-11-12 08:43:56 +00:00
mmc() {
2024-11-12 09:15:58 +00:00
local container="${1}"
mount --bind "/deb" "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb"
2023-05-09 20:02:34 +00:00
}
2024-11-12 08:43:56 +00:00
umc() {
2024-11-12 09:15:58 +00:00
local container="${1}"
umount "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb"
2023-05-09 20:02:34 +00:00
}