Problem unmounting drive
Joel W Shea
jwshea at gmail.com
Mon Dec 29 06:20:13 GMT 2008
2008/12/29 David Ryder <davaweb at bigpond.net.au>:
> Hi,
> The output of mountlog was:
>
> /bin/sh: usr/local/bin/unmount-hardy32-backups.sh: not found
> ___
> The file is:
> /usr/local/bin/unmount-hardy32-backups.sh
> ___
> The command is:
> sudo "umount /media/hardy32-backups >> /home/david/mountlog 2>&1"
> (one line)
>
> I don't know, therefore, why it reports file not found. I also note the
> error log leaves out the first /
>
Keep in mind, that cron jobs do not have the same environment settings
as a login shell.
It may be that you need to use absolute paths in your script (or set
PATH accordingly);
i.e. /bin/mount
If you're using sudo in non-interactive scripts it's probably a good
idea to use NOPASSWD: in your sudoers file.
However, since the crontab is running as root, the use of sudo is
redundant anyway.
--
Joel Shea <jwshea at gmail.com>
More information about the ubuntu-au
mailing list