Date: Sat, 4 Jan 2003 18:35:02 +1100 (EST) From: Andrew <andrew@ugh.net.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/46746: No way to set link addresses through rc.conf Message-ID: <20030104073502.8D673A818@starbug.ugh.net.au>
next in thread | raw e-mail | index | archive | help
>Number: 46746 >Category: conf >Synopsis: No way to set link addresses through rc.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 03 23:40:01 PST 2003 >Closed-Date: >Last-Modified: >Originator: Andrew >Release: FreeBSD 4.7-STABLE i386 >Organization: UgH! >Environment: System: FreeBSD starbug.ugh.net.au 4.7-STABLE FreeBSD 4.7-STABLE #9: Sun Oct 27 22:46:03 EST 2002 andrew@starbug.ugh.net.au:/usr/obj/usr/src/sys/STARBUG i386 >Description: There is no easy way to set both the link and inet addresses of an interface. There seems to be special support for ipx already - I have just extended this to all address families (and removed the specific ipx support). >How-To-Repeat: >Fix: /etc/defaults/rc.conf: --- rc.conf.orig Sat Jan 4 13:09:24 2003 +++ rc.conf Sat Jan 4 13:37:17 2003 @@ -86,6 +86,7 @@ network_interfaces="auto" # List of network interfaces (or "auto"). cloned_interfaces="" # List of cloned network interfaces to create. #cloned_interfaces="gif0 gif1 gif2 gif3" # Pre-cloning GENERIC config. +network_families="inet inet6 atalk ipx link" ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. /etc/rc.network: --- rc.network.orig Sat Jan 4 13:03:32 2003 +++ rc.network Sat Jan 4 18:45:58 2003 @@ -221,6 +221,17 @@ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} fi + # configure interfaces for other address families + for family in ${network_families}; do + for ifn in ${network_interfaces}; do + eval ifconfig_args=\$ifconfig_${ifn}_${family} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + done + for ifn in ${network_interfaces}; do # Check to see if aliases need to be added # @@ -235,14 +246,6 @@ break; fi done - - # Do ipx address if specified - # - eval ifconfig_args=\$ifconfig_${ifn}_ipx - if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} - eval showstat_$ifn=1 - fi done for ifn in ${network_interfaces}; do >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030104073502.8D673A818>