Nicolas Letellier wrote:

I want to restart named in a script executed by a cron. My script is:

# verify named conf and restart it
if [ ! $? -eq 0 ]; then
        echo "Errors when verifying named configuration"
        exit 1
        /etc/rc.d/named restart > /dev/null

# 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 
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?


Well, probably cron does not share your environment, thus it does not have your PATH. It simply cannot find the commands you see as "not found".
Try inserting something like:


at the top of your script. Alternatively, you could use full paths to the commands in the script, but it seems the errors come from the system scriprt, /etc/rc.d/named and you wouldn't want to touch that.

_______________________________________________ mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to