reload rc.conf during boot process

Markie mark.cullen at
Tue Sep 21 07:02:20 PDT 2004

----- Original Message -----
From: "Giorgos Keramidas" <keramida at>
To: "Markie" <mark.cullen at>
Cc: <freebsd-questions at>
Sent: Tuesday, September 21, 2004 2:51 PM
Subject: Re: reload rc.conf during boot process

| On 2004-09-21 14:40, Markie <mark.cullen at> wrote:
| > I was just looking at that diff you attached. I think I understand it
| > enough, but just before the esac is that like a default: style part? So
| > nothing matches, i.e if the script isn't called selectcf, then it'll
| > run the script and not reload rc.conf? Wouldn't I need a run_rc_script
| > before the unset _rc_conf_loaded, to actually run my selectcf script?
| It's there already.  I've just used a trick with md5(1) to check if the
| file rc.conf changes and you missed it because it's hidden between two
| other lines.  Just above the body of the if-block you're reading I had
| added the following:
| % +             _sum_before=`md5 /etc/rc.conf`
| % +             run_rc_script ${_rc_elem} ${_boot}
| % +             _sum_after=`md5 /etc/rc.conf`

Oh yeah! Clever stuff! I figured I had just missed something... stupid me
:-) Cheers!

Just tested that out and it seems to work, it didn't start up sshd with my
test config! I had a little problem(?) with rcorder though, I think. I

# REQUIRE: mountcritlocal

and from what I read, I was expecting my script to come up somewhere very
near mountcritlocal, but it actually appeared after sendmail.. which is
miles away. I solved it for now by putting

# BEFORE: ipfilter

aswell, because really I want it always after mountcritlocal. I'm a bit
confused as to why with # REQUIRE: mountcritlocal it was being run so late.
Did I misread something?

Anyway! With the BEFORE line it works great! Exactly how I wanted it!
Thanks alot!!

More information about the freebsd-questions mailing list