Hi,
   I don't know if this is already on a work list, but it should
be a relatively simple item:

My skripts do automatic fsck's in some situations and need the
exit code of the fsck programs to see what they have to do next.

e.g. e2fsck has the following exit codes(from the man page):

  The exit code returned by e2fsck is the sum of the follow�
  ing conditions:
        0    - No errors
        1    - File system errors corrected
        2    - File system errors corrected, system should
                   be rebooted if file system was mounted
        4    - File system errors left uncorrected
        8    - Operational error
        16   - Usage or syntax error
       128  - Shared library error

What I basically need is a ext code != 0 if the fs is not clean
after the fsck. Example:

# fsck.jfs -n /dev/slram0
fsck.jfs version 1.0.10, 28-Nov-2001
Superblock is corrupt and cannot be repaired because
both primary and secondary copies are corrupt.

FSCK CANNOT CONTINUE.

The file system type for /dev/slram0 is not listed as jfs
in the file system description file /etc/fstab.

# echo $?
0

In this case - (Superblock is corrupt), e2fsck e.g. returns with 8.

I think a list of possible exit codes of fsck.jfs should be prepared,
documented and implemented if not done yet, at least I haven't found
a description of possible exit codes from fsck.jfs.

Many thanks and Best Regards,(looking forward to support jfs on zSeries)
Bernd

----------------------------------------------------
Bernhard Kaindl / SuSE Linux for zSeries development
SuSE Linux AG
Schanz�ckerstr. 10
D-90443 Nuernberg                 e-mail: [EMAIL PROTECTED]

_______________________________________________
Jfs-discussion mailing list
[EMAIL PROTECTED]
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion

Reply via email to