Subject: shared namespace "patch"
From: Art -kwaak- van Breemen <ard@telegraafnet.nl>
Date: Fri, 6 May 2011 18:20:31 +0200
Fri, 6 May 2011 18:20:31 +0200
Hi,

To get util-vserver to setup the ip address of a vserver that has
it's network namespace shared with another, this small patch is
needed. It will make the ip address setup take place in the right
network namespace, as is expected.

It will not fix the setup of an ip address in a new network
namespace, since the setup of the ip address happens before the
new network namespace is created.
For this I usually use a small script that get's executed after a
dummy vserver is started ;-).

Regards,
Ard



--- util-vserver-0.30.216-pre2955.vanilla/scripts/vserver.functions	2011-03-18 19:45:34.000000000
+0100
+++ util-vserver-0.30.216-pre2955/scripts/vserver.functions	2011-05-04 15:51:49.651087364
+0200
@@ -717,7 +717,7 @@
 	    NAMEIF)		$_NAMEIF   "$@";;
 	    VCONFIG)		$_VCONFIG  set_name_type "$4"      >/dev/null
 				$_VCONFIG  add           "$2" "$3" >/dev/null;;
-	    IP_ADDR)		$_IP addr  add   "$@";;
+	    IP_ADDR)		"${VSPACE_SHARED_CMD[@]}" $_IP addr  add   "$@";;
 	    IP_ADDR_FLUSH)	$_IP addr  flush "$@";;
 	    IP_LINK)		$_IP link  set   "$@";;
 	    IP_ROUTE)		$_IP route add   "$@";;