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

Bug#336585: yaird: The fs_freq and fs_passno fields in /etc/fstab are optional



On Mon, Oct 31, 2005 at 11:22:23AM +0000, Ian Campbell wrote:
> Package: yaird
> Version: 0.0.11-10
> Severity: normal
> 
> When running yaird I get the following:
>   $ sudo /usr/sbin/yaird --output /tmp/initrd 2.6.14-1-386
>   yaird error: malformed line in /etc/fstab:14 (fatal)
> this also effects the linux-image-2.6.14-1-386 package.
> 
> The problem is that I have several entries in fstab without the optional
> fifth and sixth fields (fs_freq and fs_passno). The comments around line
> 49 of /usr/lib/yaird/perl/FsTab.pm suggest that the author was aware
> that these were optional fields but I thought a bug report was
> appropriate to stop the problem falling through the cracks.

What about fs_mntops? I have 
sysfs /sys sysfs
/dev/hda5 /mnt/tmp0 reiser4

if also options are optional (hmmmm... *options* are *optional*... makes
some sense) then the following trivial patch will fix the error.
BTW, a quick grep doesn't show any usage for that variable in the code,
so is this really enough?

Index: perl/FsTab.pm
===================================================================
--- perl/FsTab.pm	(revision 4704)
+++ perl/FsTab.pm	(working copy)
@@ -45,7 +45,7 @@
 		next if $line =~ /^#/;	# comment line
 		next if $line eq "";	# empty line
 		my @fields = split (/\s+/, $line, 999);
-		if ($#fields < 6) {
+		if ($#fields < 3) {
 			# no test for extra fields;
 			# the mount command allows that.
 			Base::fatal ("malformed line in $name:$lineNo");

-- 
mattia
:wq!



Reply to: