summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-01-02 17:38:26 +0000
committerOlivier Blin <oblin@mandriva.com>2008-01-02 17:38:26 +0000
commit866d1c176c00d34465fe419a468ef6c0769aa4a5 (patch)
treed9cfc6b0e2fa2dbad326b875c22d3fcbba8ee095 /perl-install
parentec404987f040875d9665c95275772c89ea9d8585 (diff)
downloaddrakx-866d1c176c00d34465fe419a468ef6c0769aa4a5.tar
drakx-866d1c176c00d34465fe419a468ef6c0769aa4a5.tar.gz
drakx-866d1c176c00d34465fe419a468ef6c0769aa4a5.tar.bz2
drakx-866d1c176c00d34465fe419a468ef6c0769aa4a5.tar.xz
drakx-866d1c176c00d34465fe419a468ef6c0769aa4a5.zip
harddrake: check that media are not USB keys before auto-configuring them (#34568)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/harddrake/data.pm5
2 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 8a6c9f24d..c7b675678 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -3,6 +3,7 @@
o make "Run config tool" available again (#34794)
o mark the service as interactive, so that package requests are
displayed with parallell init
+ o check that media are not USB keys before auto-configuring them (#34568)
- drakbug:
o report crash messages in the bug report only when --incident is used
(and not when tools explicitely run drakbug with --report)
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index c1e6a3d48..3db7b8083 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -37,6 +37,7 @@ sub f {
sub is_removable { member($_[0], qw(FLOPPY ZIP DVDROM CDROM BURNER)) }
sub is_auto_configurable_class { is_removable($_[0]) || member($_[0], qw(HARDDISK)) }
+sub is_auto_configurable_media { !detect_devices::isKeyUsb($_[0]) }
sub set_removable_configurator {
my ($class, $device) = @_;
@@ -45,12 +46,12 @@ sub set_removable_configurator {
sub set_media_auto_configurator {
my ($class, $device) = @_;
- return "/usr/sbin/drakupdate_fstab --no-flag --auto --add $device->{device}" if is_auto_configurable_class($class);
+ return "/usr/sbin/drakupdate_fstab --no-flag --auto --add $device->{device}" if is_auto_configurable_media($device);
}
sub set_media_remover {
my ($class, $device) = @_;
- return "/usr/sbin/drakupdate_fstab --no-flag --del $device->{device}" if is_auto_configurable_class($class);
+ return "/usr/sbin/drakupdate_fstab --no-flag --del $device->{device}" if is_auto_configurable_media($device);
}
my $modules_conf = modules::any_conf->read;