diff options
author | damien <damien@mandriva.com> | 2001-07-30 15:54:38 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-07-30 15:54:38 +0000 |
commit | 6c8dd68e7062a96d88a59cc128ac01ec28490a97 (patch) | |
tree | d4c1185a4853d53381e83894cd8f3b673495bd58 /perl-install/network/ethernet.pm | |
parent | 7aab173af2151843199dc229641f643538c8c161 (diff) | |
download | drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.gz drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.bz2 drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.xz drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.zip |
added internet connection selection in case of multiple configurations
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r-- | perl-install/network/ethernet.pm | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index e61cf907f..db7c6d376 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -6,8 +6,9 @@ use any; use detect_devices; use common; use run_program; +use network::tools; use vars qw(@ISA @EXPORT); -use MDK::Common::Globals "network", qw($in $prefix $install $connect_file $disconnect_file); +use MDK::Common::Globals "network", qw($in $prefix $install); @ISA = qw(Exporter); @EXPORT = qw(configureNetwork conf_network_card conf_network_card_backend go_ethernet); @@ -66,19 +67,16 @@ sub configure_lan { $netcnx->{NET_DEVICE} = $netc->{NET_DEVICE} = ''; $netcnx->{NET_INTERFACE} = 'lan'; #$netc->{NET_INTERFACE}; } - output "$prefix$connect_file", - qq( + write_cnx_script($netc, "local network", +qq( #!/bin/bash /etc/rc.d/init.d/network restart -); - output "$prefix$disconnect_file", - qq( +), +qq( #!/bin/bash /etc/rc.d/init.d/network stop /sbin/ifup lo -); - chmod 0755, "$prefix$disconnect_file"; - chmod 0755, "$prefix$connect_file"; +)); $::isStandalone and modules::write_conf($prefix); 1; } @@ -168,18 +166,15 @@ sub go_ethernet { conf_network_card($netc, $intf, $type, $ipadr, $netadr) or return; $netc->{NET_INTERFACE}=$netc->{NET_DEVICE}; configureNetwork($netc, $intf, $first_time) or return; - output "$prefix$connect_file", - qq( + write_cnx_script($netc, "Local network", +qq( #!/bin/bash ifup $netc->{NET_DEVICE} -); - output "$prefix$disconnect_file", - qq( +), +qq( #!/bin/bash ifdown $netc->{NET_DEVICE} -); - chmod 0755, "$prefix$disconnect_file"; - chmod 0755, "$prefix$connect_file"; +)); if ( $::isStandalone and $netc->{NET_DEVICE}) { $in->ask_yesorno(_("Network interface"), _("I'm about to restart the network device $netc->{NET_DEVICE}. Do you agree?"), 1) and system("$prefix/sbin/ifdown $netc->{NET_DEVICE}; $prefix/sbin/ifup $netc->{NET_DEVICE}"); |