Author: arekm Date: Sat Nov 6 20:12:58 2010 GMT
Module: PLDWWW URL:
http://www.pld-linux.org/Docs/Vserver?action=diff&rev2=163&rev1=162
---- Log message:
since plain is required we can simply check pid of init
---- Page affected: Docs/Vserver
---- Diffs:
================================================================
The comment on the change is:
since plain is required we can simply check pid of init
VSERVER_NAME="$2"
ip link add name "veth-${VSERVER_NAME}" type veth peer name
"eth-${VSERVER_NAME}"
- vserver ${VSERVER_NAME} exec sh -c 'exec sleep 60' &
- for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
- pid=$(vserver ${VSERVER_NAME} exec pidof -s sleep)
+ pid=$(vserver ${VSERVER_NAME} exec pidof -s init)
- [ -n "$pid" ] && break
- usleep 100000
- done
ip link set "eth-${VSERVER_NAME}" netns $pid
sysctl -q -w net.ipv4.conf.veth-${VSERVER_NAME}.forwarding=1
/sbin/ifup "veth-${VSERVER_NAME}"
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit