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

Re: linux-boot-prober (os-prober)



On Tuesday 19 December 2006 14:52, The Abattoir wrote:
> Ok, here's the patch. I haven't done this before, so tell me if i've
> done something wrong(or even right, for that matter).

I see a few problems with the patch after a fairly quick look.

-	if mount -o ro -t $type $partition $tmpmnt 2>/dev/null; then
+	if [ ! -n "$DO_MOUNTED" ]; then
+        	mount -o ro -t $type $partition $tmpmnt 2>/dev/null
+	fi	

AFAICT this change means that the script no longer handles a failure to 
mount the partition if it was not yet mounted.

It would probably be good to rename the oldmnt variable. As the partition 
does not get unmounted anymore that name makes no sense.

As a directory $tmpmnt is created unconditionally before the part of the 
script you modified, it still should be removed after the loop (or you 
need to change that too).

The handling of the /boot partition seems unclear. What happens if it was 
already mounted? AFAICT it will get unmounted by the script. I don't 
think the old script handled this correctly either though. Not sure if it 
is needed.

Finally, please clean up the indentation and whitespace:
- mixed use of spaces and tabs for indentation (should be tabs)
- some tabs/spaces at the end of lines

Was the patch tested?

Cheers,
FJP

Attachment: pgpkDY5JPYmOP.pgp
Description: PGP signature


Reply to: