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?


cron doesn't know about your $PATH, but has a very limited $PATH
of its own.  Rewrite the script using the full pathnames to the
desired executables.

Kevin Kinsey

--
But these pills can't be habit forming;
I've been taking them for years.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to