[Fai-commit] r6101 - branches/stable/3.4/lib/setup-storage
Michael Prokop
mika at alioth.debian.org
Tue Oct 5 15:14:39 UTC 2010
Author: mika
Date: 2010-10-05 15:14:33 +0000 (Tue, 05 Oct 2010)
New Revision: 6101
Modified:
branches/stable/3.4/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: branches/stable/3.4/lib/setup-storage/Fstab.pm
===================================================================
--- branches/stable/3.4/lib/setup-storage/Fstab.pm 2010-10-05 15:14:17 UTC (rev 6100)
+++ branches/stable/3.4/lib/setup-storage/Fstab.pm 2010-10-05 15:14:33 UTC (rev 6101)
@@ -200,22 +200,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