diff options
author | Anne Nicolas <ennael@mageia.org> | 2015-03-05 08:47:05 +0100 |
---|---|---|
committer | Anne Nicolas <ennael@mageia.org> | 2015-03-05 08:47:05 +0100 |
commit | 745849cdace7ed86ce12a9a7564bffb42edf0ef3 (patch) | |
tree | 61fc00879ab4dfbafafd59936b3b432fe1501988 /perl-install | |
parent | d5e5573306fd58f8b3cd28cf51a42cb3de379ed1 (diff) | |
download | drakx-745849cdace7ed86ce12a9a7564bffb42edf0ef3.tar drakx-745849cdace7ed86ce12a9a7564bffb42edf0ef3.tar.gz drakx-745849cdace7ed86ce12a9a7564bffb42edf0ef3.tar.bz2 drakx-745849cdace7ed86ce12a9a7564bffb42edf0ef3.tar.xz drakx-745849cdace7ed86ce12a9a7564bffb42edf0ef3.zip |
add "nofail" option to "foreign" mountpoints to avoid unwanted
recovery mode (Martin Whitaker) mga#10179
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/fs.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index f3fcdf188..b0e709d65 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -213,11 +213,12 @@ sub prepare_write_fstab { mkdir_p("$o_prefix$real_mntpoint") if $real_mntpoint =~ m|^/|; } my $mntpoint = fs::type::carry_root_loopback($_) ? '/initrd/loopfs' : $real_mntpoint; + my $needed_to_boot = member($_->{mntpoint}, fs::type::directories_needed_to_boot()); my ($freq, $passno) = exists $_->{freq} ? ($_->{freq}, $_->{passno}) : - isTrueLocalFS($_) && !$_->{dmcrypt_name} && $_->{options} !~ /encryption=/ && (!$_->{is_removable} || member($_->{mntpoint}, fs::type::directories_needed_to_boot())) ? + isTrueLocalFS($_) && !$_->{dmcrypt_name} && $_->{options} !~ /encryption=/ && (!$_->{is_removable} || $needed_to_boot) ? (1, $_->{mntpoint} eq '/' ? 1 : fs::type::carry_root_loopback($_) ? 0 : 2) : (0, 0); @@ -227,6 +228,9 @@ sub prepare_write_fstab { $new{$mntpoint} = 1; my $options = $_->{options} || 'defaults'; + if (($_->{is_removable} || member($_->{fs_type}, qw(ntfs ntfs-3g))) && !$needed_to_boot && $_->{options} !~ /nofail/) { + "$options .= ',nofail'; + } if ($_->{fs_type} eq 'cifs' && $options =~ /password=/ && !$b_keep_credentials) { require fs::remote::smb; |