Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15282 - new RAID part of checkfs doesn't recognize comments in raidtab and requires basename
Summary: new RAID part of checkfs doesn't recognize comments in raidtab and requires b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-07 13:08 UTC by Quinn Harris
Modified: 2003-02-17 14:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quinn Harris 2003-02-07 13:08:17 UTC
This applies to the checkfs script in baselayout-1.8.6.2

The checkfs script uses 'basename' which is associated with the sh-utils
package.  The default location for this file is under /usr/bin.  On my system,
the partition for /usr is on a RAID device, therefore basename isn't available
until after the script has been run.

The checkfs script will treat lines that have been commented with '#' like they
were not commented.

My previous bug 9322 is now obsolete as the checkfs script has completely changed.
A similar issues are discussed in bug 14527

Reproducible: Always
Steps to Reproduce:
Comment 1 Quinn Harris 2003-02-07 13:12:44 UTC
My previous description needs clarification.

The checkfs script will treat lines <b>from raidtab</b> that have been commented with '#' like they were not commented.

Sorry
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-16 18:33:52 UTC
Please check if the following patch fixes:

--------------------------------------------------------------------
Index: checkfs
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/checkfs,v
retrieving revision 1.21
diff -u -b -B -r1.21 checkfs
--- checkfs	26 Jan 2003 15:51:56 -0000	1.21
+++ checkfs	16 Feb 2003 23:31:49 -0000
@@ -42,9 +42,9 @@
 		local rc=0
 		local retval=0
         
-		for i in `grep "^[^*]*raiddev" /etc/raidtab | awk '{print $2}'`
+		for i in `grep "^[^*]*raiddev" /etc/raidtab | awk '$0 !~ /^[[:space:]]*#/ {print $2}'`
 		do
-			local raiddev="`basename ${i}`"
+			local raiddev="${i##*/}"
 			local raidstat="$(egrep "^${raiddev} : active" /proc/mdstat)"
 			
 			if [ -z "${raidstat}" ]
Comment 3 Quinn Harris 2003-02-17 01:42:39 UTC
That patch fixes the problems! 
 
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-17 14:49:44 UTC
Ok, great.  It has already been fixed in CVS.