From owner-freebsd-questions@FreeBSD.ORG Tue Jun 24 18:22:33 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 5B5BB1065673 for ; Tue, 24 Jun 2008 18:22:33 +0000 (UTC) (envelope-from schiz0phrenic21@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id 3A5FA8FC12 for ; Tue, 24 Jun 2008 18:22:33 +0000 (UTC) (envelope-from schiz0phrenic21@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so2503928wfg.7 for ; Tue, 24 Jun 2008 11:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=qjAxpWNk9c778oYIm7sB9RfH5sw6+K2+ieRDNuF+f9I=; b=WJ2RNkoT1BzwPSpwu3k7y8LJey7OoaKtJQtj6kxT6SSp9UffPPMcv0oT5iLATsQeMZ acnWky92xqFAIJ7rObIOo6CCjs9Og5gxI9W6uCWDNj0w0PIjVi0sznGsZWeh08rIlzTb XQAoXzaJDyhAJa+vvdidcsmKx2tMnOvmOY8K8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=HrBkrqLWKvsA991UxTuo8CmRkb+ulZEh9CTyU64SWlAPbl9hGArxsIwYEm+jf/a0Gq jQck9F0hoOq78S5G2w4aNOB35I8Nlrgf8fhrXwfOffhIWyUFqJTXSHTpUZGp7yb/8ylT O580EU8EAtS2/MMiML5goKOjAJQ/sjzVlkbV8= Received: by 10.142.47.13 with SMTP id u13mr6002454wfu.170.1214331752872; Tue, 24 Jun 2008 11:22:32 -0700 (PDT) Received: by 10.114.254.11 with HTTP; Tue, 24 Jun 2008 11:22:32 -0700 (PDT) Message-ID: <8d23ec860806241122v849e770x2ae96d3a68152de4@mail.gmail.com> Date: Tue, 24 Jun 2008 14:22:32 -0400 From: Schiz0 To: "Nicolas Letellier" In-Reply-To: <20080624201720.e90b1a07.nicolas@nicoelro.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080624201720.e90b1a07.nicolas@nicoelro.net> 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:22:33 -0000 On Tue, Jun 24, 2008 at 2:17 PM, 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? > > Thanks! > > -- > -Nicolas. The /etc/rc.d/named script probably relies on the $PATH to start some stuff up. Since it's run via cron, try setting the $PATH in your crontab (or the script itself).