[ Next-in-Thread ]  [ Next Message ] 

Idea: Nit in 3.0.14 pcmcia/network script 

Forum: PCMCIA Network Adapter Issues
Date: 2000, Feb 26
From: Glen Ditchfield gjditchfield

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

[ Next-in-Thread ]  [ Next Message ] 

Select this message: Nit in 3.0.14 pcmcia/network script

Messages Inline: [ 1 ]  [ All ]  Outline: [ 1 ]  [ 2 ]  [ All ] 

1. You're right by David Hinds, 2000, Feb 28

Message Administration

This form allows you to delete, move, or copy one or more messages. You can move messages by copying and deleting the original. The action will be applied to the messages you select above and all replies to those selected messages.


If you want to copy or move messages, specify the HyperNews path of a destination forum or message that all messages will be copied or moved to. The destination must already exist, so maybe create it first.

Path of Destination (a Forum or Message): (e.g. "test")

Notify Subscribers at destination
NO


If you want to delete messages (the default), specify that here. If you want to move messages, you need to delete the original messages; placeholders will be left pointing to where they were moved.

Delete Messages
NO


Caution: After deleteing messages (the default), if you have not copied them (i.e. no destination above), then the selected messages are not be recoverable.

[ Members ]  [ Subscribe ]  [ No Admin Mode ] 
[ Show Frames ]  [ Help for HyperNews at pcmcia-cs.sourceforge.net 1.10 ] 
[ Edit This Forum ]