|
My network.opts script used to contain
# Host's IP address, netmask, network address, broadcast address
IPADDR="192.168.0.1"
#NETMASK=""
#NETWORK=""
#BROADCAST=""
This worked, but /var/log/messages contained warning messages:
...cardmgr[361]: executing: './network start eth0' ...cardmgr[361]: + Usage: ...cardmgr[361]: + ifconfig [-a] [-i] [-v] <interface> [[<AF>] <address>] ...cardmgr[361]: + [add <address>[/<prefixlen>]] ... The problem was that NETWORK wasn't set when network executed the lines
# Basic network setup
BC=${BROADCAST:+broadcast $BROADCAST}
/sbin/ifconfig $DEVICE up $IPADDR netmask $NETMASK $BC
Shouldn't the 'netmask' parameter be guarded in the same way as 'broadcast'?
***************
*** 75,86 ****
if [ "$IPADDR" ] ; then
# Basic network setup
BC=${BROADCAST:+broadcast $BROADCAST}
! /sbin/ifconfig $DEVICE up $IPADDR netmask $NETMASK $BC
if [ "$NETWORK" ] ; then
/sbin/ifuser $DEVICE $NETWORK || \
! /sbin/route add -net $NETWORK netmask $NETMASK dev $DEVICE
elif [ "$GATEWAY" ] ; then
/sbin/ifuser $DEVICE $GATEWAY || \
/sbin/route add $GATEWAY $DEVICE
--- 75,87 ----
if [ "$IPADDR" ] ; then
# Basic network setup
+ NM=${NETMASK:+netmask $NETMASK}
BC=${BROADCAST:+broadcast $BROADCAST}
! /sbin/ifconfig $DEVICE up $IPADDR $NM $BC
if [ "$NETWORK" ] ; then /sbin/ifuser $DEVICE $NETWORK || \ ! /sbin/route add -net $NETWORK $NM dev $DEVICE elif [ "$GATEWAY" ] ; then /sbin/ifuser $DEVICE $GATEWAY || \ /sbin/route add $GATEWAY $DEVICE
|
You're right
| |
|