From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 27 21:05:15 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1224216A41C for ; Mon, 27 Jun 2005 21:05:15 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE42843D49 for ; Mon, 27 Jun 2005 21:05:14 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id j5RL5AEH054855; Mon, 27 Jun 2005 16:05:10 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Date: Mon, 27 Jun 2005 16:05:20 -0500 (CDT) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: Darren Pilgrim In-Reply-To: <004f01c57b4e$34a289a0$0b2a15ac@SMILEY> Message-ID: <20050627160130.X87609@thor.farley.org> References: <004f01c57b4e$34a289a0$0b2a15ac@SMILEY> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1040642303-1119906320=:87609" Cc: hackers@freebsd.org Subject: RE: How to disable at-boot configuration of a network interface but permit manual use of rc.d? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2005 21:05:15 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1040642303-1119906320=:87609 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 27 Jun 2005, Darren Pilgrim wrote: > From: Niki Denev [mailto:nike_d@cytexbg.com] >> Darren Pilgrim wrote: >>> There are some conditions to the task given by the subject: >>> >>> 1: The interface must be present at boot. >>> 2: Use of /etc/rc.d scripts to start and stop the interface is >>> desirable. >>> >>> The first condition poses no problem, just don't include the >>> relevant ifconfig_ifn line in /etc/rc.conf and the interface won't >>> be configured. But rc.d/dhclient and rc.d/netif won't work without >>> an ifconfig line for the interface. >>> >>> Adding the ifconfig line and then listing every interface but the >>> one I want configured in network_interfaces does prevent it from >>> being configured at boot while having an ifconfig line in rc.conf, >>> but if I try to use rc.d/netif to start the interface, rc.d/netif >>> does nothing because it tests the interface against the contents of >>> network_interfaces and cloned_interfaces, so the interface I left >>> out will be excluded. >>> >>> Have I overlooked an option somewhere? >> >> What happens if you configure the interface in 'down' state, like : >> >> ifconfig_fxp0=3D"inet 192.168.0.10 netmask 0xffffff00 down" > > Then rc.d/dhclient won't work. The "DHCP" keyword must be present in > the ifconfig line in order for dhcpif to test true. A similar logic > is in place for wpaif based on the "WPA" keyword. I am not sure it will help, but have you tried playing with /etc/start_if.DEVICE scripts? I do not know where they are documented, but you can configure a network device this way. I used it in the past to change the MAC address on a NIC at boot before the card was configured in rc.conf. Se=E1n --=20 sean-freebsd@farley.org --0-1040642303-1119906320=:87609--