Date: Tue, 27 Apr 2010 14:07:00 -0400 From: Ross West <westr@connection.ca> To: freebsd-rc@freebsd.org Subject: rc(8) script -- waiting for the network to become usable Message-ID: <106993233.20100427140700@connection.ca>
next in thread | raw e-mail | index | archive | help
(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? --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?106993233.20100427140700>