Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jul 2014 13:33:01 -0400
From:      "Mike." <the.lists@mgm51.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: run sh rc cause two cron process running
Message-ID:  <201407231333010555.00FDB5EB@smtp.24cl.home>
In-Reply-To: <20140723162119.GA46908@neutralgood.org>
References:  <CADyrUxPAwDJ2VjfJXhAbgm73oAkmW1CZ4gUZ1%2B_EUzwgZdR9Qg@mail.gmail.com> <20140723162119.GA46908@neutralgood.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/23/2014 at 12:21 PM kpneal@pobox.com wrote:

|On Wed, Jul 23, 2014 at 07:18:17PM +0800, Jov wrote:
|> when I change something in the /etc/rc.conf,I want to test the config
|> without reboot.I find cd /etc/ && sh rc can do it.but after the
|command,My
|> system have 2 cron process,and some cron drived E-mail send twice a
day.
|> But I find other daemon such ntpd do not have this problem.
|> Is this a bug?
|
|No, that's pilot error.
|
|If you want to test changes for a specific service then stop and then
start
|that service. For example:
|
|# /etc/rc.d/cron stop
|# /etc/rc.d/cron start
|
|Wait a second or two between the stopping and the starting just to be
safe.
|
|If you want to test the entire boot process then you have no real choice
|except to reboot. But I will say that in all my years I've never created
|a problem simply by editing rc.conf that required testing with a reboot.
|
|I have made changes that required testing with a full reboot, but there
was
|more to that than changing rc.conf.
 =============



After I make changes to rc.conf, I always run

	sh -n rc.conf

to check for syntax errors, e.g., a missing quote, which can have a less
than positive effect upon the boot process.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407231333010555.00FDB5EB>