From 663d99bb14fd92d4b47f06a12ed344893e96e843 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 12 Nov 2024 10:15:58 +0100 Subject: [PATCH] lxc --- bash/mount-lxc.sh | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/bash/mount-lxc.sh b/bash/mount-lxc.sh index 2cc5a7e..2a4b5a1 100644 --- a/bash/mount-lxc.sh +++ b/bash/mount-lxc.sh @@ -1,31 +1,32 @@ 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 + 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 } crc() { -local container="${1}" - shift - chroot "overlay/mount/var/lib/lxc/${container}/squashfs-root" "${@}" + local container="${1}" + shift + chroot "overlay/mount/var/lib/lxc/${container}/squashfs-root" "${@}" } 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 + 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 } mmc() { -local container="${1}" - mount --bind "/deb" "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb" + local container="${1}" + mount --bind "/deb" "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb" } umc() { -local container="${1}" - umount "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb" + local container="${1}" + umount "overlay/mount/var/lib/lxc/${container}/squashfs-root/deb" }