From owner-freebsd-questions@FreeBSD.ORG Tue Jun 24 18:39:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D181065673 for ; Tue, 24 Jun 2008 18:39:24 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id A3ACC8FC1B for ; Tue, 24 Jun 2008 18:39:24 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id m5OIbU0p094018; Tue, 24 Jun 2008 14:37:30 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id m5OIbUJo094017; Tue, 24 Jun 2008 14:37:30 -0400 (EDT) (envelope-from jerrymc) Date: Tue, 24 Jun 2008 14:37:30 -0400 From: Jerry McAllister To: Nicolas Letellier Message-ID: <20080624183730.GA93973@gizmo.acns.msu.edu> References: <20080624201720.e90b1a07.nicolas@nicoelro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080624201720.e90b1a07.nicolas@nicoelro.net> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD Questions Subject: Re: restart named in a cron X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 18:39:24 -0000 On Tue, Jun 24, 2008 at 08:17:20PM +0200, Nicolas Letellier wrote: > Hi. > > I want to restart named in a script executed by a cron. My script is: > > #!/bin/sh > # verify named conf and restart it > /usr/sbin/named-checkconf > if [ ! $? -eq 0 ]; then > echo "Errors when verifying named configuration" > exit 1 > else > /etc/rc.d/named restart > /dev/null > fi > > # Ok, it's done > exit 0 > > > However, the cron returns some errors: > umount: not found > mtree: not found > umount: not found > mount: not found > /etc/rc.d/named: WARNING: devfs_domount(): Unable to mount devfs on /var/named/dev > devfs: not found > devfs: not found > > I can restart named manually, but not with a cron. > > Do you have an idea to solve this problem? Why could I restart it > manually and not with a cron? The CRON jog is missing /sbin and /usr/sbin from its path. Try setting $PATH in the script. ////jerry > > Thanks! > > -- > -Nicolas. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"