summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index bdb364896..23c7547e9 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -217,6 +217,10 @@ sub prepare_write_fstab {
($_->{mntpoint} eq '/' ? "/initrd/loopfs" : $_->{loopback_device}{mntpoint}) . $_->{loopback_file} :
fs::wild_device::from_part($o_prefix, $_);
+ my $comment = $_->{comment};
+ $comment = '' if $comment =~ m!^Entry for /dev/.* :!;
+ $comment ||= "# Entry for /dev/$_->{device} :\n" if $device =~ /^(UUID|LABEL)=/;
+
my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}};
mkdir_p("$o_prefix$real_mntpoint") if $real_mntpoint =~ m|^/|;
my $mntpoint = fs::type::carry_root_loopback($_) ? '/initrd/loopfs' : $real_mntpoint;
@@ -249,7 +253,7 @@ sub prepare_write_fstab {
my $file_dep = $options =~ /\b(loop|bind)\b/ ? $device : '';
- [ $file_dep, $mntpoint, $_->{comment} . join(' ', $device, $mntpoint, $fs_type, $options || 'defaults', $freq, $passno) . "\n" ];
+ [ $file_dep, $mntpoint, $comment . join(' ', $device, $mntpoint, $fs_type, $options || 'defaults', $freq, $passno) . "\n" ];
} else {
();
}