diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-08-29 13:04:34 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-08-29 13:04:34 +0000 |
commit | 4cab9d5d508d6cafbc6e860a1ecd04b8750ff804 (patch) | |
tree | 7e14082e37f0b77376f0e068110f675fac20feba /perl-install | |
parent | 1ec9ba137b1aa9a0c373463ecdfa9233eb244559 (diff) | |
download | drakx-4cab9d5d508d6cafbc6e860a1ecd04b8750ff804.tar drakx-4cab9d5d508d6cafbc6e860a1ecd04b8750ff804.tar.gz drakx-4cab9d5d508d6cafbc6e860a1ecd04b8750ff804.tar.bz2 drakx-4cab9d5d508d6cafbc6e860a1ecd04b8750ff804.tar.xz drakx-4cab9d5d508d6cafbc6e860a1ecd04b8750ff804.zip |
in --auto, print the mount points add/removed for use in hotplug
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/drakupdate_fstab | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab index 1ae5d7f42..0d5f3c4ff 100755 --- a/perl-install/standalone/drakupdate_fstab +++ b/perl-install/standalone/drakupdate_fstab @@ -44,7 +44,7 @@ sub check_hard_drives { #- do not do anything if there are many partitions #- otherwise we may add main extended partitions if ($name =~ s|/part\d+$||) { - ! grep { /part[5-9]/ } all($name); + grep { /part/ } all($name) <= 1; } else { 1; } @@ -75,8 +75,7 @@ sub device_name_to_entry { } sub set_options { - my ($part) = @_; - my $use_supermount = cat_('/etc/fstab') =~ /supermount/; + my ($part, $use_supermount) = @_; my $security = any::get_secure_level(); my ($iocharset, $codepage) = lang::fs_options(lang::read()); @@ -85,6 +84,7 @@ sub set_options { sub set_mount_point { my ($part, $fstab) = @_; + my $mntpoint = detect_devices::suggest_mount_point($part) or return; $mntpoint = "/mnt/$mntpoint"; @@ -120,11 +120,16 @@ sub main { print STDERR "Already in fstab\n" if $::testing; return; } - set_options($part); + my $use_supermount = cat_('/etc/fstab') =~ /supermount/; + set_options($part, $use_supermount); set_mount_point($part, $fstab) or return; my ($line) = fs::prepare_write_fstab([$part]); append_to_file($fstab_file, $line) if $line; + + if ($::auto) { + print $part->{mntpoint}, " ", $use_supermount ? 'supermount' : 'user', "\n"; + } } else { if (!@$existing_fstab_entries) { print STDERR "Not found in fstab\n" if $::testing; @@ -132,6 +137,10 @@ sub main { } my ($s) = fs::prepare_write_fstab($fstab_, '', 'keep_smb_credentials'); output($fstab_file, $s); + + if ($::auto) { + print "$_->{mntpoint}\n" foreach @$existing_fstab_entries; + } } if ($::testing) { |