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

Bug#249755: doesn't detect ext2 revision 0 file system



* Martin Michlmayr <tbm@cyrius.com> [2005-11-03 20:02]:
> * Martin Michlmayr <tbm@cyrius.com> [2004-05-19 02:14]:
> > partman doesn't recognize ext2 revision 0 as ext2r0 but shows it as
> > ext2.  Ideally, what it should do is this: if it finds an ext2 file
> > system, it should run "tune2fs -l" over the partition.
> 
> Is the patch below acceptable?
> 
> Comments:
>  - I'm not if testing for a file belonging to partman-ext2r0 is the
>    best way to check if it is available.  Maybe valid_filesystems/ext2r0
>    should be called?  But I don't know.

Anton, do you have a more elegant way or is it okay to apply the patch
I proposed?

> Index: partman-base/update.d/detected_filesystem
> ===================================================================
> --- partman-base/update.d/detected_filesystem	(revision 31824)
> +++ partman-base/update.d/detected_filesystem	(working copy)
> @@ -28,6 +28,11 @@
>  	rm -f $id/detected_filesystem
>      else
>  	[ -d $id ] || mkdir $id
> +	if [ "$filesystem" = "ext2" -a -f /lib/partman/parted_names/ext2r0 ]; then
> +		if $(tune2fs -l $path | grep -q "^Filesystem revision #: \+0 (original)$"); then
> +			filesystem=ext2r0
> +		fi
> +	fi
>  	echo "$filesystem" >$id/detected_filesystem
>      fi  
>  fi

-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: