Re: Replacing LABEL's with devices

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

 



On Tue, 04 Nov 2003 11:31:16 -0500
Brian Akins [Brian] wrote:

Brian> Anyone got a good way to replace the LABEL's in fstab with actually
Brian> devices in %post?

if you can (want to) rebuild anaconda, you can patch fsset.py:

[...]
    def fstab (self):
        format = "%-23s %-23s %-7s %-15s %d %d\n"
        fstab = ""
        for entry in self.entries:
            if entry.mountpoint:
                if entry.getLabel():
                    device = "LABEL=%s" % (entry.getLabel(),)
                else:
                    device = devify(entry.device.getDevice())
                fstab = fstab + entry.device.getComment()
                fstab = fstab + format % (device, entry.mountpoint,
                                          entry.fsystem.getName(),
                                          entry.options, entry.fsck,
                                          entry.order)
        return fstab
[...]

seems quite easy and more reliable than a quickly-written script :-)

-- 
Alain 




[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux