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

Bug#336928: yaird should use /etc/mtab or the mount output to determine the filesystem, instead of fstab



Package: yaird
Severity: normal



hi Erik, hi Jonas, ...

I think it would be better for yaird to use /etc/mtab instead of /etc/fstab to
parse for the root mount point, in effect, this one is guaranteed to be always
full fielded, and not have any of the problems related to strangely filled
user entries in the /etc/fstab.

Here is an example of my own / line : 

/dev/hda12 / ext3 rw,noatime,errors=remount-ro,commit=600 0 0

which is equivalent to the output of the mount command :

/dev/hda12 on / type ext3 (rw,noatime,errors=remount-ro,commit=600)

A very tentative untried patch may be :

--- perl/FsTab.pm       (revision 4702)
+++ perl/FsTab.pm       (working copy)
@@ -34,7 +34,7 @@
                return;
        }
        $fsTab = [];
-       my $name = Conf::get('fstab');
+       my $name = Conf::get('mtab');
        if (! open (IN, "<", "$name")) {
                Base::fatal ("can't read $name");
        }

Altough something more advanced where it searches for mtab and falls back to
fstab if no mtab exists may be more adequate.

Notice that i did remember some code in debian-installer doing exactly this,
but i don't remember where it was.

Friendly,

Sven Luther

-- System Information:
Debian Release: 3.1
Architecture: powerpc (ppc)
Kernel: Linux 2.6.12-1-powerpc
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)




Reply to: