Re: conf/30441: Can't set interface arguments for dhcp configured interfaces

Neil Bliss <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
Hey folks,

I just ran into this problem, and here's my proposed fix for it.  Feel free to
incorporate it, or not. =)

Index: rc.network
===================================================================
RCS file: /home/ncvs/src/etc/rc.network,v
retrieving revision 1.134
diff -c -r1.134 rc.network
*** rc.network  2002/04/11 22:06:27     1.134
--- rc.network  2002/05/08 19:01:20
***************
*** 211,219 ****
                case ${ifconfig_args} in
                '')
                        ;;
!               [Dd][Hh][Cc][Pp])
                        # DHCP inits are done all in one go below
                        dhcp_interfaces="$dhcp_interfaces $ifn"
                        eval showstat_$ifn=1
                        ;;
                *)
--- 211,225 ----
                case ${ifconfig_args} in
                '')
                        ;;
!               [Dd][Hh][Cc][Pp])
                        # DHCP inits are done all in one go below
                        dhcp_interfaces="$dhcp_interfaces $ifn"
                        eval showstat_$ifn=1
                        ;;
                *)
--- 211,225 ----
                case ${ifconfig_args} in
                '')
                        ;;
!               *[Dd][Hh][Cc][Pp]*)
                        # DHCP inits are done all in one go below
                        dhcp_interfaces="$dhcp_interfaces $ifn"
+                       # eat the DHCP token, and apply any other args.
+                       ifconfig_args=`echo $ifconfig_args \
+                               | sed s/[Dd][Hh][Cc][Pp]//`
+                       if [ -n "${ifconfig_args}" ]; then
+                               ifconfig ${ifn} ${ifconfig_args}
+                       fi
                        eval showstat_$ifn=1
                        ;;
                *)


later,

Neil

-- 
Neil Bliss - Monta Vista Technical Support
Yow!-Zippy-says: I once decorated my apartment entirely in ten foot salad forks!!

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.