Skip to content

Commit

Permalink
put comments on a seperate line, Closes: #784842
Browse files Browse the repository at this point in the history
Thanks to Raphael Geissert for the patch
  • Loading branch information
Thomas Lange committed Jun 12, 2015
1 parent ced06d6 commit d3bfdfa
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/setup-storage/Fstab.pm
Expand Up @@ -48,6 +48,11 @@ sub create_fstab_line {
my ($d_ref, $name, $dev_name) = @_;

my @fstab_line = ();
my @comment_line = ();

# add a comment denoting the actual device name in case of UUID or LABEL
push @comment_line, "# device during installation: $dev_name\n"
if ($name =~ /^(UUID|LABEL)=/);

# start with the device key
push @fstab_line, $name;
Expand All @@ -61,10 +66,6 @@ sub create_fstab_line {
$fstab_line[-1] = 0 if ($d_ref->{filesystem} eq "swap");
$fstab_line[-1] = 0 if ($d_ref->{filesystem} eq "tmpfs");

# add a comment denoting the actual device name in case of UUID or LABEL
push @fstab_line, "# device during installation: $dev_name"
if ($name =~ /^(UUID|LABEL)=/);

# set the ROOT_PARTITION variable, if this is the mountpoint for /
$FAI::disk_var{ROOT_PARTITION} = $name
if ($d_ref->{mountpoint} eq "/");
Expand All @@ -73,8 +74,11 @@ sub create_fstab_line {
$FAI::disk_var{SWAPLIST} .= " " . $dev_name
if ($d_ref->{filesystem} eq "swap");

my $ret = '';
$ret = join ("\n", @comment_line)."\n" if (scalar(@comment_line));
# join the columns of one line with tabs
return join ("\t", @fstab_line);
$ret .= join ("\t", @fstab_line);
return $ret;
}


Expand Down

0 comments on commit d3bfdfa

Please sign in to comment.