Gentoo Archives: gentoo-dev

From: Mike Lincoln <mclinc@××××××××.uk>
To: gentoo-dev@g.o
Subject: [gentoo-dev] checkfs oddities
Date: Thu, 13 Nov 2003 14:03:14
Message-Id: 1068732152.29593.30.camel@nightshade
1 Hello all,
2 I believe I have found (and fixed) a trivial bug in checkfs, but that's
3 not the reason for this email. I was about to file it with bugzilla and
4 I found something quite strange.
5
6 First off the bug:
7
8 /etc/init.d/checkfs v1.29 incorrectly tests the return code from fsck
9 at line 201.
10
11 >elif [ "${retval}" -gt 1 -a "${retval}" -lt 4 ]
12 > then
13 > ewend 1 "Filesystem errors corrected."
14 > # Everything should be ok, so return a pass
15 > return 0
16 > else
17
18 Should, IMHO, read:
19
20 >elif [ "${retval}" -ge 1 -a "${retval}" -lt 4 ]
21 > then
22 > ewend 1 "Filesystem errors corrected."
23 > # Everything should be ok, so return a pass
24 > return 0
25 > else
26
27 Note the -gt goes to -ge because fsck returns 1 on corrected errors.
28 BTW. I discovered this with a jfs root file system. This is because
29 fsck.jfs alway seems to return 1 when it replays the log. I guess
30 that's a feature looking at the man page.
31
32 Now for the odditie: I have two gentoo boxes, both have recently run
33 "emerge sync && emerge baselayout". I've double checked and both boxes
34 have the same version of baselayout. /However/, they have different
35 versions of checkfs! I've reemerged baselayout on both machines, but
36 they still have different versions of checkfs 1.23 and 1.29.
37
38 Proof is bellow, can anyone shed any light on this?
39
40 I'm a bit of a Gentoo newbie I'm afraid, so sorry if I'm being brain
41 damaged here. If there is anything I can do to assist, just ask.
42
43 Best regards,
44
45 Mike
46
47 --------------
48 Box A:
49
50 # etcat -b /etc/init.d/checkfs
51 Searching for /etc/init.d/checkfs in * ...
52 sys-apps/baselayout-1.8.6.10-r1
53
54 # etcat -v baselayout
55 [ Results for search key : baselayout ]
56 [ Applications found : 1 ]
57
58 * sys-apps/baselayout :
59 [ ] sys-apps/baselayout-1.8.5.9 (0)
60 [ ] sys-apps/baselayout-1.8.6.8-r1 (0)
61 [ I] sys-apps/baselayout-1.8.6.10-r1 (0)
62 [M~ ] sys-apps/baselayout-1.8.6.11 (0)
63 [M~ ] sys-apps/baselayout-1.8.6.12 (0)
64
65 # grep Header /etc/init.d/checkfs
66 # $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/checkfs,v 1.23
67 2003/03/24 15:25:05 azarah Exp $
68
69
70 --------
71
72 Box B
73
74 # etcat -b /etc/init.d/checkfs
75 Searching for /etc/init.d/checkfs in * ...
76 sys-apps/baselayout-1.8.6.10-r1
77
78 # etcat -v baselayout
79 [ Results for search key : baselayout ]
80 [ Applications found : 1 ]
81
82 * sys-apps/baselayout :
83 [ ] sys-apps/baselayout-1.8.5.9 (0)
84 [ ] sys-apps/baselayout-1.8.6.8-r1 (0)
85 [ I] sys-apps/baselayout-1.8.6.10-r1 (0)
86 [M~ ] sys-apps/baselayout-1.8.6.11 (0)
87 [M~ ] sys-apps/baselayout-1.8.6.12 (0)
88
89 # grep Header /etc/init.d/checkfs
90 # $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/checkfs,v 1.29
91 2003/08/04 19:41:15 azarah Exp $
92
93
94
95 --
96 Dr. Michael C Lincoln
97 Vision And Synthetic Environments
98 University of Essex
99 OFFICE: 01206 87 3708

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] checkfs oddities Jason Rhinelander <jason@××××××××××××××××.com>