X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=host%2Fchroot;h=1367155ab87641d463e1ec4aa1805561c9b01936;hp=ce1bda3aacb805db65f1b4433a0b40721151faaf;hb=82a43a9c95892ecfa8bad1a72b490ad0bf60cd3b;hpb=3ad6118386977e346d81042e924e5db9c5f15b7d diff --git a/host/chroot b/host/chroot index ce1bda3..1367155 100755 --- a/host/chroot +++ b/host/chroot @@ -9,18 +9,18 @@ tool=$(readlink -e "${0%/*}/..") "$tool"/host/part-var-mount #"$tool"/host/part-home-mount -mountpoint -q /mnt/$vm_fqdn/proc || -sudo mount -t proc proc /mnt/$vm_fqdn/proc -mountpoint -q /mnt/$vm_fqdn/sys || -sudo mount -t sysfs sys /mnt/$vm_fqdn/sys -mountpoint -q /mnt/$vm_fqdn/dev || -sudo mount --bind /dev /mnt/$vm_fqdn/dev -if test -d /mnt/$vm_fqdn/root/src/vm/.git +mountpoint -q /mnt/$local_fqdn/proc || +sudo mount -t proc proc /mnt/$local_fqdn/proc +mountpoint -q /mnt/$local_fqdn/sys || +sudo mount -t sysfs sys /mnt/$local_fqdn/sys +mountpoint -q /mnt/$local_fqdn/dev || +sudo mount --bind /dev /mnt/$local_fqdn/dev +if test -d /mnt/$local_fqdn/root/src/$local_hostname/.git then - mountpoint -q /mnt/$vm_fqdn/root/src/vm || - sudo mount --bind "$tool" /mnt/$vm_fqdn/root/src/vm + mountpoint -q /mnt/$local_fqdn/root/src/$local_hostname || + sudo mount --bind "$tool" /mnt/$local_fqdn/root/src/$local_hostname else - sudo rsync -a "$tool"/ /mnt/$vm_fqdn/root/src/vm + sudo rsync -a "$tool"/ /mnt/$local_fqdn/root/src/$local_hostname fi -sudo chroot /mnt/$vm_fqdn /bin/bash || true +sudo chroot /mnt/$local_fqdn /bin/bash || true "$tool"/host/chroot-clean