From owner-freebsd-questions@FreeBSD.ORG Wed Jul 23 17:33:12 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B4652E0 for ; Wed, 23 Jul 2014 17:33:12 +0000 (UTC) Received: from oneyou.mcmli.com (oneyou.mcmli.com [IPv6:2001:470:1d:8da::100]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "oneyou.mcmli.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 175382697 for ; Wed, 23 Jul 2014 17:33:12 +0000 (UTC) Received: from sentry.24cl.com (unknown [IPv6:2001:558:6017:a2:a860:3073:4c46:6ac9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "sentry.24cl.com", Issuer "Mike's Certificate Authority" (verified OK)) by oneyou.mcmli.com (Postfix) with ESMTPS id 3hJP050FWDz1DPH for ; Wed, 23 Jul 2014 13:33:09 -0400 (EDT) Received: from BigBloat (bigbloat.24cl.home [10.20.1.4]) by sentry.24cl.com (Postfix) with ESMTP id 3hJP022xdVz1C7W for ; Wed, 23 Jul 2014 13:33:06 -0400 (EDT) Message-ID: <201407231333010555.00FDB5EB@smtp.24cl.home> In-Reply-To: <20140723162119.GA46908@neutralgood.org> References: <20140723162119.GA46908@neutralgood.org> X-Mailer: Courier 3.50.00.09.1098 (http://www.rosecitysoftware.com) (P) Date: Wed, 23 Jul 2014 13:33:01 -0400 From: "Mike." To: freebsd-questions@freebsd.org Subject: Re: run sh rc cause two cron process running Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 17:33:12 -0000 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.