From owner-freebsd-hackers Mon Oct 15 21:14:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.plug.cx (kypo.alfred.cx [150.101.93.134]) by hub.freebsd.org (Postfix) with ESMTP id 05F8D37B403; Mon, 15 Oct 2001 21:14:07 -0700 (PDT) Received: by mail.plug.cx (Postfix, from userid 1000) id A0B952B8BF; Tue, 16 Oct 2001 14:08:39 +0930 (CST) Date: Tue, 16 Oct 2001 14:08:38 +0930 From: Andrew Reid To: Dan Nelson Cc: Andrew Reid , j balan , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Network Startup Message-ID: <20011016140837.C12702@plug.cx> References: <200110152116.f9FLGsL51934@proscouting.com> <20011015162221.B8674@dan.emsphone.com> <20011016100105.D12238@plug.cx> <20011015212017.B73961@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011015212017.B73961@dan.emsphone.com>; from dnelson@allantgroup.com on Mon, Oct 15, 2001 at 09:20:17PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 15, 2001 at 09:20:17PM -0500, Dan Nelson wrote: > > That's a bit of a problem as far as I'm concerned. Perhaps the network > > scripts should be redesigned in a similar manner to the one taken on be > > RedHat. > > Of course, you can always run the equivalent commands yourself to get > the system in synch with what you put in rc.conf. i.e. if you added an > alias ip to an interface, you can run > > ifconfig xxx inet 1.2.3.4 alias Oh, for sure. That's what I, and the majority of the community, do now. I think that it's not particularly convenient if you want to restart the network if you've got 3 or 4 network interfaces. > > I started playing around with such a thing, using usr/local/etc/rc.d/ > > as a base for 'network' scripts which take arguments such as 'start', > > 'stop' and 'restart'. > > > > Implementation of such a thing would be fairly trivial methinks. What > > are the thoughts on this sort of approach to management of network > > interfaces and ancillary services? > > Is it smart enough to only add the alias interface on "restart", or > does it try to deconfigure the whole NIC, and add all the IPs back? I've only gone as far as nuking the entire interface and bringing it all up again, including the alias. I've not tested the time difference between doing it the way it current does, and being 'smart' (as you say), and only configure the alias. However, if someone issues 'sh network.sh restart', I'd expect just that to happen -- the entire network to be restarted, not bits of it. Similarly, if I was to issue 'sh network.sh start rl0', I'd expect it to start the interface from scratch. Perhaps there is room there for some 'smartness' whereby the ifconfig commands are only issued if the current interface configuration is different to that in the configuration file. > How about if you change an IP number? Is it smart enough to kill and > restart named, inetd, smbd, or any other programs that might have bound > to that IP? It's not as simple as "I'll just rerun the ifconfig > commands", and I stand by "reboot is the only sure way" :) Perhaps it could be. For services that are controlled by /usr/local/etc/rc.d/*.sh, it mightn't be that hard. Control of inetd, named, smbd, or anything like that could also be done by a /usr/local/etc/rc.d/*.sh file. I can see this entire issue of startup scripts will spiral quickly into a larger task if it was decided that there needed to be a change in the way that the activity of other daemons such as inetd, named et al. were controlled. Then again, I don't consider such a change as a "bad thing". - andrew -- void signature () { cout << "Andrew Reid -- andrew.reid@plug.cx" << endl; cout << "Cell: +61 401 946 813" << endl; cout << "Quidquid latine dictum sit, altum viditur" << endl; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message