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

Michael Tautschnig mt at alioth.debian.org
Sat Oct 9 19:49:15 UTC 2010


Author: mt
Date: 2010-10-09 19:49:06 +0000 (Sat, 09 Oct 2010)
New Revision: 6120

Added:
   branches/experimental/patches/setup-storage_quote-preserved-type
Modified:
   branches/experimental/patches/series
Log:
Added Peter Kruse's patch for the linux-swap(v1) + preserve issue


Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series	2010-10-09 19:18:00 UTC (rev 6119)
+++ branches/experimental/patches/series	2010-10-09 19:49:06 UTC (rev 6120)
@@ -19,3 +19,4 @@
 setup-storage_cryptsetup-passphrase
 simple-example_squeeze
 improved-doc-of-hooks
+setup-storage_quote-preserved-type

Added: branches/experimental/patches/setup-storage_quote-preserved-type
===================================================================
--- branches/experimental/patches/setup-storage_quote-preserved-type	                        (rev 0)
+++ branches/experimental/patches/setup-storage_quote-preserved-type	2010-10-09 19:49:06 UTC (rev 6120)
@@ -0,0 +1,37 @@
+2010-10-09  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Commands.pm: Quote fs argument in parted mkpart calls as
+	special characters may be in use that confuse the shell as in, e.g.,
+	linux-swap(v1) (thanks Peter Kruse for the patch).
+
+Index: trunk/lib/setup-storage/Commands.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Commands.pm
++++ trunk/lib/setup-storage/Commands.pm	
+@@ -864,7 +864,7 @@
+     $post .= ",rebuilt_" . &FAI::make_device_name($disk, $part_nr) if
+       $FAI::configs{$config}{partitions}{$part_id}{size}{resize};
+     # build a parted command to create the partition
+-    &FAI::push_command( "parted -s $disk mkpart $part_type $fs ${start}B ${end}B",
++    &FAI::push_command( "parted -s $disk mkpart $part_type \"$fs\" ${start}B ${end}B",
+       "cleared1_$disk", $post );
+   }
+ }
+@@ -1063,7 +1063,7 @@
+     my $pre = "";
+     $pre = ",exist_" . &FAI::make_device_name($disk, $prev_id) if ($prev_id > -1);
+     # build a parted command to create the partition
+-    &FAI::push_command( "parted -s $disk mkpart $part_type $fs ${start}B ${end}B",
++    &FAI::push_command( "parted -s $disk mkpart $part_type \"$fs\" ${start}B ${end}B",
+       "cleared2_$disk$pre", "exist_" . &FAI::make_device_name($disk, $part_id) );
+     $prev_id = $part_id;
+   }
+@@ -1187,7 +1187,7 @@
+       my $fs = $curr_part->{filesystem};
+ 
+       # build a parted command to create the partition
+-      &FAI::execute_command("parted -s $disk mkpart $part_type $fs ${start}B ${end}B");
++      &FAI::execute_command("parted -s $disk mkpart $part_type \"$fs\" ${start}B ${end}B");
+     }
+     warn "Partition table of disk $disk has been restored\n";
+   }




More information about the Fai-commit mailing list