[Fai-commit] r6059 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Fri Sep 17 18:15:29 UTC 2010


Author: mt
Date: 2010-09-17 18:15:26 +0000 (Fri, 17 Sep 2010)
New Revision: 6059

Added:
   branches/experimental/patches/setup-storage_no-readlink
Modified:
   branches/experimental/patches/series
Log:
don't resolve LVM names via readlink, this breaks several setups


Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series	2010-09-17 17:48:06 UTC (rev 6058)
+++ branches/experimental/patches/series	2010-09-17 18:15:26 UTC (rev 6059)
@@ -12,3 +12,4 @@
 setup-storage_preserve-format-all
 setup-storage_gpt-bios-fix
 setup-storage_user-100-percent
+setup-storage_no-readlink

Added: branches/experimental/patches/setup-storage_no-readlink
===================================================================
--- branches/experimental/patches/setup-storage_no-readlink	                        (rev 0)
+++ branches/experimental/patches/setup-storage_no-readlink	2010-09-17 18:15:26 UTC (rev 6059)
@@ -0,0 +1,32 @@
+2010-09-17  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Fstab.pm: Don't resolve LVM devices via readlink; the
+		underlying canoncial path names aren't stable across reboots (thanks Brian
+		Kroth for suggesting a similar patch).
+Index: trunk/lib/setup-storage/Fstab.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Fstab.pm
++++ trunk/lib/setup-storage/Fstab.pm	
+@@ -248,21 +248,7 @@
+         # skip entries without a mountpoint
+         next if ($l_ref->{mountpoint} eq "-");
+ 
+-        # real device name
+-        my @fstab_key = ();
+-
+-        # 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];
++        my $device_name = "/dev/$device/$l";
+ 
+         # if the mount point the /boot mount point, variables must be set
+         if ($l_ref->{mountpoint} eq $boot_mnt_point) {




More information about the Fai-commit mailing list