[Fai-commit] r6158 - branches/stable/3.4/lib/setup-storage
Michael Prokop
mika at alioth.debian.org
Fri Oct 15 11:09:43 UTC 2010
Author: mika
Date: 2010-10-15 11:09:42 +0000 (Fri, 15 Oct 2010)
New Revision: 6158
Modified:
branches/stable/3.4/lib/setup-storage/Commands.pm
Log:
setup-storage/Commands.pm: Quote fs argument in parted mkpart calls
Special characters may be in use that confuse the shell as in, e.g.,
linux-swap(v1) (thanks Peter Kruse for the patch).
Modified: branches/stable/3.4/lib/setup-storage/Commands.pm
===================================================================
--- branches/stable/3.4/lib/setup-storage/Commands.pm 2010-10-15 11:09:28 UTC (rev 6157)
+++ branches/stable/3.4/lib/setup-storage/Commands.pm 2010-10-15 11:09:42 UTC (rev 6158)
@@ -849,7 +849,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 );
}
}
@@ -1042,7 +1042,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;
}
@@ -1155,7 +1155,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