[Fai-commit] r6060 - trunk/lib/setup-storage

Michael Tautschnig mt at alioth.debian.org
Fri Sep 17 21:09:44 UTC 2010


Author: mt
Date: 2010-09-17 21:09:29 +0000 (Fri, 17 Sep 2010)
New Revision: 6060

Modified:
   trunk/lib/setup-storage/Fstab.pm
Log:
setup-storage/Fstab.pm: Don't resolve LVM devices via readlink (thanks Brian Kroth for suggesting a similar patch).

The underlying canoncial path names aren't stable across reboots, hence these
must not be used.

Closes: #597238



Modified: trunk/lib/setup-storage/Fstab.pm
===================================================================
--- trunk/lib/setup-storage/Fstab.pm	2010-09-17 18:15:26 UTC (rev 6059)
+++ trunk/lib/setup-storage/Fstab.pm	2010-09-17 21:09:29 UTC (rev 6060)
@@ -201,22 +201,8 @@
         # skip entries without a mountpoint
         next if ($l_ref->{mountpoint} eq "-");
 
-        # real device name
-        my @fstab_key = ();
+        my $device_name = "/dev/$device/$l";
 
-        # resolve the symlink to the real device
-        # and write it as the first entry
-        &FAI::execute_ro_command("readlink -f /dev/$device/$l", \@fstab_key, 0);
-
-        # remove the newline
-        chomp ($fstab_key[0]);
-
-        # make sure we got back a real device
-        ($FAI::no_dry_run == 0 || -b $fstab_key[0]) 
-          or die "Failed to resolve /dev/$device/$l\n";
-
-        my $device_name = $fstab_key[0];
-
         # according to http://grub.enbug.org/LVMandRAID, this should work...
         # if the mount point is / or /boot, the variables should be set, unless
         # they are already




More information about the Fai-commit mailing list