X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vbuild-init-vserver.sh;h=301b8389549fdc4771cb52064ebd062536fda756;hb=2e59ab083e35aea21faefac78b187ebf4621cd7d;hp=49e183de3567183b989fb8b51b811920d9869d3b;hpb=f789dd1b8278c708bf73c2b0b8f3eec26098522e;p=build.git diff --git a/vbuild-init-vserver.sh b/vbuild-init-vserver.sh index 49e183de..301b8389 100755 --- a/vbuild-init-vserver.sh +++ b/vbuild-init-vserver.sh @@ -85,7 +85,7 @@ function package_method () { fcdistro=$1; shift case $fcdistro in f[0-9]*|centos[0-9]*|sl[0-9]*) echo yum ;; - squeeze|wheezy|oneiric|precise|quantal) echo debootstrap ;; + squeeze|wheezy|oneiric|precise|quantal|raring) echo debootstrap ;; *) echo Unknown distro $fcdistro ;; esac } @@ -96,7 +96,7 @@ function debian_mirror () { case $fcdistro in squeeze|wheezy) echo http://ftp2.fr.debian.org/debian/ ;; - oneiric|precise|quantal) + oneiric|precise|quantal|raring) echo http://mir1.ovh.net/ubuntu/ubuntu/ ;; *) echo unknown distro $fcdistro; exit 1;; esac @@ -246,7 +246,9 @@ function setup_vserver () { # start the vserver so we can do the following operations # redirect out/err to protect against the vserver's init sequence getting stalled # mostly used for f10 vservers created remotely through ssh - $personality vserver $VERBOSE $vserver start >& /dev/null + # with ubuntu/raring, somehow this fails, so ignore retcod, + # as subsequent vserver exec will fail anyway + $personality vserver $VERBOSE $vserver start >& /dev/null || : if [ "$pkg_method" == "yum" ] ; then $personality vserver $VERBOSE $vserver exec sh -c "rm -f /var/lib/rpm/__db*" @@ -274,6 +276,10 @@ function setup_vserver () { # try the simple way, if that fails try to cross fix the rpm hashes $personality vserver $VERBOSE $vserver exec rpm --rebuilddb || translate_rpm_hashes $personality $vserver + + elif [ "$pkg_method" == "debootstrap" ] ; then + # just check the vm is running + $personality vserver $VERBOSE $vserver exec arch fi # check if the vserver kernel is using VSERVER_DEVICE (vdevmap) support