[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Fsck (presumably e2fsck) returns exit code 127 on an ext3 filesy stem



On Mon, 29 Sep 2003, Steele, Gregory F wrote:

> fsck (Red Hat Enterprise Linux AS 2.1) returns an exit code 127 on an ext3
> file system when run from a shellscript started by cron. Here is the
> pertinent part of the script:

> fsck -p /dev/${BK_SLICE} 1>/dev/null 2>&1

<CLIP>
pehesaari-11:~$ fsck
bash: fsck: command not found
pehesaari-11:~$ echo $? 
127
</CLIP>

Value 127 is returned by /bin/sh when the given command is is not found
from PATH and it is not a builtin shell command. My guess is, that your
cron job is missing /sbin from its PATH:

<CLIP>
pehesaari-11:~$ /sbin/fsck
fsck 1.27 (8-Mar-2002)

No devices specified to be checked!
pehesaari-11:~$ echo $?
8
</CLIP>

- Jani




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]