summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-23 17:39:09 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-23 17:39:09 +0000
commit52138223f28366a4d2b2b90533de7dddcd375b78 (patch)
tree6edbfd7a8ec42718913a0b6b3e602e025d90b608 /perl-install/standalone
parentaf403ee1a8c3e7a1c0f38273255e5c14dec0d1f5 (diff)
downloaddrakx-52138223f28366a4d2b2b90533de7dddcd375b78.tar
drakx-52138223f28366a4d2b2b90533de7dddcd375b78.tar.gz
drakx-52138223f28366a4d2b2b90533de7dddcd375b78.tar.bz2
drakx-52138223f28366a4d2b2b90533de7dddcd375b78.tar.xz
drakx-52138223f28366a4d2b2b90533de7dddcd375b78.zip
(del_intf) enable to delete ADSL and ISDN connections
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakconnect16
1 files changed, 13 insertions, 3 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 830132fe0..fbfa347d2 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -640,11 +640,21 @@ sub del_intf() {
welcome => {
no_back => 1,
name => N("Select the network interface to remove:"),
- data => [ { label => N("Net Device"), val => \$intf2delete, list => [ keys %$intf ], allow_empty_list => 1 } ],
+ data => [ { label => N("Net Device"), val => \$intf2delete, allow_empty_list => 1,
+ list => [ keys %$intf, grep { -f "/etc/ppp/peers/$_" } qw(adsl isdn) ], } ],
post => sub {
!$::testing and eval {
- system("ifdown $intf2delete");
- rm_rf("/etc/sysconfig/network-scripts/ifcfg-$intf2delete");
+ if (member($intf2delete, qw(adsl isdn))) {
+ system("service internet stop");
+ # system("ifdown " . $intf2delete eq "isdn" : "ippp0" : "ppp0");
+ rm_rf("/etc/ppp/peers/$intf2delete");
+ if (any { /$intf2delete/ } cat_("/etc/sysconfig/network-scripts/net_cnx_up")) {
+ unlink "/etc/sysconfig/network-scripts/net_cnx_$_" foreach qw(up down);
+ }
+ } else {
+ system("ifdown $intf2delete");
+ rm_rf("/etc/sysconfig/network-scripts/ifcfg-$intf2delete");
+ }
};
$faillure = $@;
},