# -*-shell-*-
# $Id$
+#shopt -s huponexit
+
COMMAND=$(basename $0)
DIRNAME=$(dirname $0)
# pkgs parsing utilities
PATH=$(dirname $0):$PATH . build.common
-DEFAULT_FCDISTRO=centos5
+DEFAULT_FCDISTRO=f8
DEFAULT_PLDISTRO=planetlab
DEFAULT_PERSONALITY=linux32
DEFAULT_IFNAME=eth0
fi
# start the vserver so we can do the following operations
+# rm -f /tmp/go*
+# echo -n ' about to start - WAITING for /tmp/go1' ; while true ; do [ -f /tmp/go1 ] && break || : ; done
$personality vserver $VERBOSE $vserver start
+# echo -n ' started - WAITING for /tmp/go2' ; while true ; do [ -f /tmp/go2 ] && break || : ; done
+#if true ; then
+# echo SKIPPING for debug --- vserver was started
+#else
[ "$pkg_method" = "yum" ] && $personality vserver $VERBOSE $vserver exec sh -c "rm -f /var/lib/rpm/__db*"
[ "$pkg_method" = "yum" ] && $personality vserver $VERBOSE $vserver exec rpm --rebuilddb
- # with vserver 2.3, granting the vserver CAP_MKNOD is not enough
- # check whether we run vs2.3 or above
- vs_version=$(uname -a | sed -e 's,.*[\.\-]vs\([0-9]\)\.\([0-9]\)\..*,\1\2,')
- # at this stage we have here 22 or 23
- need_vdevmap=$(( $vs_version >= 23 ))
+ # check if the vserver kernel is using VSERVER_DEVICE (vdevmap) support
+ need_vdevmap=$(grep "CONFIG_VSERVER_DEVICE=y" /boot/config-$(uname -r) | wc -l)
- if [ "$need_vdevmap" == 1 ] ; then
+ if [ $need_vdevmap -eq 1 ] ; then
ctx=$(cat /etc/vservers/$vserver/context)
vdevmap --set --xid $ctx --open --create --target /dev/null
vdevmap --set --xid $ctx --open --create --target /dev/root
cp /etc/resolv.conf /vservers/$vserver/etc/resolv.conf
# and /etc/hosts for at least localhost
[ -f /vservers/$vserver/etc/hosts ] || echo "127.0.0.1 localhost localhost.localdomain" > /vservers/$vserver/etc/hosts
+
+#fi
+
}
function devel_or_vtest_tools () {