[TriLUG] e2fsck under cron gets retcode=8 operational error
Alan Porter
porter at trilug.org
Tue Sep 18 15:37:06 EDT 2012
> Since the script runs fine from the CLI, I'm wondering if there's
> something about running fsck under cron. I execute fsck with the
> pathname (/usr/sbin/e2fsck) so there's no problem finding the executable.
See if there is something in your interactive shell profile that is
changing things. Instead of calling the fsck command directly from cron,
create a shell script that does a "source /etc/profile" and maybe a
"source $HOME/.bash_profile" and maybe even "source .bashrc" (replacing
"source" with "." as appropriate if your shell is not bash). Then run
the fsck. Then exit $? to return the fsck return code back to cron.
See if that works... that might tell you if there is something in the
path or some other bit that you're setting up when you log in, that is
not being set up for cron.
--
# ɹǝʇɹoԀ uɐl∀
More information about the TriLUG
mailing list