From owner-freebsd-rc@FreeBSD.ORG Tue Apr 27 18:07:02 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D19BC1065778 for ; Tue, 27 Apr 2010 18:07:02 +0000 (UTC) (envelope-from westr@connection.ca) Received: from nc-tor-mail1.connection.ca (nc-tor-mail1.connection.ca [205.207.122.26]) by mx1.freebsd.org (Postfix) with ESMTP id AF7A28FC17 for ; Tue, 27 Apr 2010 18:07:02 +0000 (UTC) Received: from westr-main.tor.connection.ca (external.tor.connection.ca [216.234.38.18]) by nc-tor-mail1.connection.ca (Postfix) with ESMTP id CB74D44B3C2 for ; Tue, 27 Apr 2010 14:07:01 -0400 (EDT) Date: Tue, 27 Apr 2010 14:07:00 -0400 From: Ross West Organization: Network Connection X-Priority: 3 (Normal) Message-ID: <106993233.20100427140700@connection.ca> To: freebsd-rc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: rc(8) script -- waiting for the network to become usable X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ross West List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2010 18:07:02 -0000 (ugh, sorry about the blank message previously) > The boot-up process will still continue regardless if the ping check > passed or failed. It just means that daemons/services attempting to use > the network and *expect* connectivity to work may not function > correctly (meaning: they'll behave just like they already do. ;-) ) A thought that I had on this would be to create another placeholder in the /etc/rc.d directory which would allow better reordering of those applications that require layer3+ connectivity for their operations. As an example - Using the placeholder of "INTERNET" which is simply defined in (/etc/rc.d/INTERNET) as this: -= #!/bin/sh # # PROVIDE: INTERNET # REQUIRE: NETWORKING -= This allows scripts like the earlier suggested waitnetwork to be called before it's execution with the "BEFORE:" rc keyword and not be tied to other scripts like mountcritremote. If you don't like the waitnetwork script, then you can just add your own to /usr/local/etc/rc.d very easily. (eg: What about a second script for ipv6??) Other scripts can easily then use the keyword without having the worry about ordering issues that might arise unexpectedly if something changes in the future. The more I think of this, the keyword of "internet" isn't the best, and something like "CONNECTIVITY" would be better, although the keyword of INTERNET would probably be used more often correctly by rc.d script authors. :-) Also probably need to bind the REQUIRE rc keyword to something else like SERVERS or DAEMON or even LOGIN. That would be better so it happens much later in the startup - things like dhclient don't happen until the very end after LOGIN even. (running rcorder(8) can show interesting ordering choices it makes) Thoughts? --