Date: Tue, 24 Jun 2008 14:22:32 -0400 From: Schiz0 <schiz0phrenic21@gmail.com> To: "Nicolas Letellier" <nicolas@nicoelro.net> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: restart named in a cron Message-ID: <8d23ec860806241122v849e770x2ae96d3a68152de4@mail.gmail.com> In-Reply-To: <20080624201720.e90b1a07.nicolas@nicoelro.net> References: <20080624201720.e90b1a07.nicolas@nicoelro.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 24, 2008 at 2:17 PM, Nicolas Letellier <nicolas@nicoelro.net> 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).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8d23ec860806241122v849e770x2ae96d3a68152de4>