diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-06 16:37:13 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-06 16:37:13 +0000 |
commit | c77b87d710880640f98aafd20f991559358c9a74 (patch) | |
tree | fb719489539db03e73ae11a193f091fe290d0ee5 /perl-install/modules.pm | |
parent | 7250092b8ce0358c27529eb6144caee0855854d2 (diff) | |
download | drakx-c77b87d710880640f98aafd20f991559358c9a74.tar drakx-c77b87d710880640f98aafd20f991559358c9a74.tar.gz drakx-c77b87d710880640f98aafd20f991559358c9a74.tar.bz2 drakx-c77b87d710880640f98aafd20f991559358c9a74.tar.xz drakx-c77b87d710880640f98aafd20f991559358c9a74.zip |
- generalize & rename remove_alias() as remove_alias_regexp() to handle regexps
- introduce back a simple remove_alias() wrapper to remove_alias_regexp()
- change remove_alias*() API from remove_alias(module) to remove_alias(alias)
btw old behaviour was broken if eg one has two 3com cards when
network::ethernet::configureNetwork removed all ethX aliases on
3c59x
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r-- | perl-install/modules.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index e78b3d8d4..21a54070a 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -172,8 +172,13 @@ sub add_probeall { sub remove_alias($) { my ($name) = @_; + remove_alias_regexp("^$name\$"); +} + +sub remove_alias_regexp($) { + my ($name) = @_; foreach (keys %conf) { - $conf{$_}{alias} && $conf{$_}{alias} eq $name or next; + $conf{$_}{alias} && $_ =~ qr/$name/ or next; delete $conf{$_}{alias}; return 1; } |