From owner-freebsd-bugs Fri Jan 3 23:40: 6 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0D0437B401 for ; Fri, 3 Jan 2003 23:40:03 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55F4343EE6 for ; Fri, 3 Jan 2003 23:40:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h047e2NS030711 for ; Fri, 3 Jan 2003 23:40:02 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h047e2OL030710; Fri, 3 Jan 2003 23:40:02 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1C6A37B401 for ; Fri, 3 Jan 2003 23:35:07 -0800 (PST) Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7F0A43ED4 for ; Fri, 3 Jan 2003 23:35:06 -0800 (PST) (envelope-from andrew@ugh.net.au) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id 8D673A818; Sat, 4 Jan 2003 18:35:02 +1100 (EST) Message-Id: <20030104073502.8D673A818@starbug.ugh.net.au> Date: Sat, 4 Jan 2003 18:35:02 +1100 (EST) From: Andrew Reply-To: Andrew To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: conf/46746: No way to set link addresses through rc.conf Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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