rc.d/resolv currently not being run under certain circumstances
Doug Barton
dougb at FreeBSD.org
Sun Mar 18 00:30:37 UTC 2007
Due to the fact that scripts which are ordered before
early_late_divider in the second run are not executed (see rc), if a
script gets reordered into the early phase as a result of including
the local startups, it won't be run at all. On at least one of my
systems that's happening to resolv (in both HEAD and RELENG_6). It
goes from close to last in rcorder (after securelevel) to absolutely
first after you include the local startups I have (nothing exciting,
just a few ports).
Currently resolv is a little thin in terms of ordering hints. It
contains only PROVIDE and KEYWORD, and nothing REQUIREs it. Can
someone who knows what this script is for (brooks?) add either a
REQUIRE in or for resolv, or both? The CVS logs seem to indicate that
it's related to diskless booting, so I don't want to touch it if I
don't have to. :)
FWIW, I use the attached patch to rc to debug this problem.
--
This .signature sanitized for your protection
-------------- next part --------------
--- /etc/rc Sat May 6 21:00:23 2006
+++ rc Sat Mar 17 16:45:13 2007
@@ -85,8 +47,12 @@
#
files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`
+# XXX
+rm -f rc.early* rc.late
+
for _rc_elem in ${files}; do
- run_rc_script ${_rc_elem} ${_boot}
+ #run_rc_script ${_rc_elem} ${_boot}
+ echo $_rc_elem >> rc.early1
case "$_rc_elem" in
*/${early_late_divider}) break ;;
@@ -107,15 +73,21 @@
_skip_early=1
for _rc_elem in ${files}; do
case "$_skip_early" in
- 1) case "$_rc_elem" in
+ 1)
+ echo $_rc_elem >> rc.early2
+ case "$_rc_elem" in
*/${early_late_divider}) _skip_early=0 ;;
esac
continue
;;
esac
- run_rc_script ${_rc_elem} ${_boot}
+ echo $_rc_elem >> rc.late
+
+ #run_rc_script ${_rc_elem} ${_boot}
done
+
+diff -u rc.early*
echo ''
date
More information about the freebsd-rc
mailing list