If an interface has more than one IP alias, then broadcasts/netmasks are not assigned correctly. -------------------------------------------------------------------------------- Example. if /etc/conf.d/net file has following strings: alias_eth0="ip01 ip02 ip03" broadcast_eth0="bc01 bc02 bc03" netmask_eth0="nm01 nm02 nm03" then running /etc/init.d/net.eth0 will execute following: /sbin/ifconfig eth0:0 ip01 broadcast bc01 bc02 bc03 netmask nm01 nm02 nm03 /sbin/ifconfig eth0:1 ip02 broadcast bc01 netmask nm01 /sbin/ifconfig eth0:2 ip03 broadcast bc02 netmask nm02 -------------------------------------------------------------------------------- This behavior is caused by using "awk '{ print $num }'" in /etc/init.d/net.eth0, where $num starts with "0", but awk's indexing starts with "1". here is the fix(until "EOF"): --- net.eth0.orig 2002-12-10 13:53:09.000000000 +0200 +++ net.eth0 2002-12-10 13:59:14.000000000 +0200 @@ -52,13 +52,13 @@ ebegin " Adding aliases" for x in $(eval echo \$\{alias_${IFACE}\}) do - aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk \'\{ print \$${num} \}\')" + aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk \'\{ print \$$((${num}+1)) \}\')" if [ -n "${aliasbcast}" ] then aliasbcast="broadcast ${aliasbcast}" fi - aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'\{ print \$${num} \}\')" + aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'\{ print \$$((${num}+1)) \}\')" if [ -n "${aliasnmask}" ] then aliasnmask="netmask ${aliasnmask}" EOF -------------------------------------------------------------------------------- or another fix, without using awk at all(until "EOF"): --- net.eth0.orig 2002-12-10 13:53:09.000000000 +0200 +++ net.eth0 2002-12-10 14:06:15.000000000 +0200 @@ -52,13 +52,13 @@ ebegin " Adding aliases" for x in $(eval echo \$\{alias_${IFACE}\}) do - aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk \'\{ print \$${num} \}\')" + aliasbcast="$(eval x=(\$\{broadcast_${IFACE}\}) \; echo \$\{x[${num}]\})" if [ -n "${aliasbcast}" ] then aliasbcast="broadcast ${aliasbcast}" fi - aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'\{ print \$${num} \}\')" + aliasnmask="$(eval x=(\$\{netmask_${IFACE}\}) \; echo \$\{x[${num}]\})" if [ -n "${aliasnmask}" ] then aliasnmask="netmask ${aliasnmask}" EOF --------------------------------------------------------------------------------
This was already fixed, please update baselayout, or ._cfg files lying around. *** This bug has been marked as a duplicate of 7407 ***