Re: Changed gentoo-add_ip.sh to work with baselayout-vserver-1.11.14-r3 [message #1990 is a reply to message #1989] |
Sat, 11 March 2006 17:52 |
steffen.zieger
Messages: 43 Registered: February 2006 Location: Germany, Stuttgart
|
Member |
|
|
So, we have to wait until baselayout-vserver-1.11.14-r4 is marked stable and telling people, that they should change their network-config (this is, because of some people want to have a useable gentoo-template). No problem.
I've updated to the new baselayout-vserver and it works.
Here is a new patch to gentoo-add_ip.sh:
--- gentoo-add_ip.sh.orig 2006-03-01 09:46:27.000000000 +0100
+++ gentoo-add_ip.sh 2006-03-11 18:47:52.805755280 +0100
@@ -22,7 +22,6 @@
VENET_DEV=venet0
FAKEGATEWAY=191.255.255.1
-FAKEGATEWAYNET=191.255.255.0
IFCFG_DIR=/etc/conf.d
IFCFG=${IFCFG_DIR}/net
@@ -37,7 +36,7 @@
rc-update del net.eth0 &>/dev/null
ln -sf /etc/init.d/net.lo /etc/init.d/net.${VENET_DEV}
rc-update add net.lo boot &>/dev/null
- rc-update add net.venet0 default &>/dev/null
+ rc-update add net.${VENET_DEV} default &>/dev/null
if ! grep -qe "^config_eth" ${IFCFG} 2>/dev/null; then
return 0
fi
@@ -54,7 +53,7 @@
fix_net
put_param3 ${IFCFG} "config_${VENET_DEV}" ""
# add fake route
- put_param3 ${IFCFG} "routes_${VENET_DEV}" "-net ${FAKEGATEWAYNET}/24"
+ put_param3 ${IFCFG} "routes_${VENET_DEV}" "-net ${FAKEGATEWAY} netmask 255.255.255.255"
add_param3 ${IFCFG} "routes_${VENET_DEV}" "default via ${FAKEGATEWAY}"
# Set up /etc/hosts
if [ ! -f ${HOSTFILE} ]; then
This version is working with baselayout-vserver-1.11.14-r4. Because of a bug in previous baselayout-vserver-versions you have to update to baselayout-vserver-1.11.14-r4 or newer.
HTH,
Steffen
PS@Jason: The whole gentoo-add_ip.sh-script isn't using iproute2. The problem you mentioned some posts ago (dev venet0 problem) isn't interesting for vzctl until gentoo-add_ip.sh will be updated to use iproute2. This is only an informational note.
|
|
|