Hello all,
I believe I have found (and fixed) a trivial bug in checkfs, but that's
not the reason for this email. I was about to file it with bugzilla and
I found something quite strange.
First off the bug:
/etc/init.d/checkfs v1.29 incorrectly tests the return code from fsck
at line 201.
>elif [ "${retval}" -gt 1 -a "${retval}" -lt 4 ]
> then
> ewend 1 "Filesystem errors corrected."
> # Everything should be ok, so return a pass
> return 0
> else
Should, IMHO, read:
>elif [ "${retval}" -ge 1 -a "${retval}" -lt 4 ]
> then
> ewend 1 "Filesystem errors corrected."
> # Everything should be ok, so return a pass
> return 0
> else
Note the -gt goes to -ge because fsck returns 1 on corrected errors.
BTW. I discovered this with a jfs root file system. This is because
fsck.jfs alway seems to return 1 when it replays the log. I guess
that's a feature looking at the man page.
Now for the odditie: I have two gentoo boxes, both have recently run
"emerge sync && emerge baselayout". I've double checked and both boxes
have the same version of baselayout. /However/, they have different
versions of checkfs! I've reemerged baselayout on both machines, but
they still have different versions of checkfs 1.23 and 1.29.
Proof is bellow, can anyone shed any light on this?
I'm a bit of a Gentoo newbie I'm afraid, so sorry if I'm being brain
damaged here. If there is anything I can do to assist, just ask.
Best regards,
Mike
--------------
Box A:
# etcat -b /etc/init.d/checkfs
Searching for /etc/init.d/checkfs in * ...
sys-apps/baselayout-1.8.6.10-r1
# etcat -v baselayout
[ Results for search key : baselayout ]
[ Applications found : 1 ]
* sys-apps/baselayout :
[ ] sys-apps/baselayout-1.8.5.9 (0)
[ ] sys-apps/baselayout-1.8.6.8-r1 (0)
[ I] sys-apps/baselayout-1.8.6.10-r1 (0)
[M~ ] sys-apps/baselayout-1.8.6.11 (0)
[M~ ] sys-apps/baselayout-1.8.6.12 (0)
# grep Header /etc/init.d/checkfs
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/checkfs,v 1.23
2003/03/24 15:25:05 azarah Exp $
--------
Box B
# etcat -b /etc/init.d/checkfs
Searching for /etc/init.d/checkfs in * ...
sys-apps/baselayout-1.8.6.10-r1
# etcat -v baselayout
[ Results for search key : baselayout ]
[ Applications found : 1 ]
* sys-apps/baselayout :
[ ] sys-apps/baselayout-1.8.5.9 (0)
[ ] sys-apps/baselayout-1.8.6.8-r1 (0)
[ I] sys-apps/baselayout-1.8.6.10-r1 (0)
[M~ ] sys-apps/baselayout-1.8.6.11 (0)
[M~ ] sys-apps/baselayout-1.8.6.12 (0)
# grep Header /etc/init.d/checkfs
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/checkfs,v 1.29
2003/08/04 19:41:15 azarah Exp $
--
Dr. Michael C Lincoln
Vision And Synthetic Environments
University of Essex
OFFICE: 01206 87 3708
signature.asc
Description: This is a digitally signed message part
