Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8030 - net.eth0 does not work for multiple aliases
Summary: net.eth0 does not work for multiple aliases
Status: RESOLVED DUPLICATE of bug 7407
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-17 08:24 UTC by naanyaar2000
Modified: 2005-07-17 13:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description naanyaar2000 2002-09-17 08:24:04 UTC
In /etc/init.d/net.eth0, lines that say something like:

aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk
\'\{ print \$${num} \}\')"
...
aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'
\{ print \$${num} \}\')"

should actually be:

aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk
\'\{ print \$${num+1} \}\')"
...
aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'
\{ print \$${num+1} \}\')"

That is, 'num' should actually be 'num+1'  since $0 == whole record in awk. 
Note that it works OK for a single alias since $0 == $1 in that case.
Comment 1 SpanKY gentoo-dev 2002-09-17 13:18:13 UTC
post to Bug 7407 ... they are still pondering how to implement it

*** This bug has been marked as a duplicate of 7407 ***
Comment 2 naanyaar2000 2002-09-17 15:29:44 UTC
Oops... typo alert.

It should be $((num+1)) above in the fixed version.