X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lbuild-initvm.sh;h=85c1f82a73baaa894214093787338c19ef19caa3;hb=21c97c89145ce71787a8df492e2b2c6323bab67c;hp=2f27397716b5ac9344e93f8bc4538383ffb1dcb7;hpb=3aa5e047733851962127f68ff284dcba6d953143;p=build.git diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 2f273977..85c1f82a 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -453,9 +453,11 @@ function setup_lxc() { # Enable cgroup -- xxx -- is this really useful ? [ -d $lxc_root/cgroup ] || mkdir $lxc_root/cgroup - # set up resolv.conf + ### set up resolv.conf from host + # ubuntu precise and on, /etc/resolv.conf is a symlink to ../run/resolvconf/resolv.conf + [ -h $lxc_root/etc/resolv.conf ] && rm -f $lxc_root/etc/resolv.conf cp /etc/resolv.conf $lxc_root/etc/resolv.conf - # and /etc/hosts for at least localhost + ### and /etc/hosts for at least localhost [ -f $lxc_root/etc/hosts ] || echo "127.0.0.1 localhost localhost.localdomain" > $lxc_root/etc/hosts # grant ssh access from host to guest