diff options
author | damien <damien@mandriva.com> | 2001-07-04 23:20:35 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-07-04 23:20:35 +0000 |
commit | 578dc4f6c9e3f302ad839fa011bdf4bf85a5ef9b (patch) | |
tree | 1a6883675e2b92253ccaf1df468a97182a9e3408 /perl-install/network/netconnect.pm | |
parent | 4eff584aa8d9fbe794e2d334824a052d4f69ccf4 (diff) | |
download | drakx-backup-do-not-use-578dc4f6c9e3f302ad839fa011bdf4bf85a5ef9b.tar drakx-backup-do-not-use-578dc4f6c9e3f302ad839fa011bdf4bf85a5ef9b.tar.gz drakx-backup-do-not-use-578dc4f6c9e3f302ad839fa011bdf4bf85a5ef9b.tar.bz2 drakx-backup-do-not-use-578dc4f6c9e3f302ad839fa011bdf4bf85a5ef9b.tar.xz drakx-backup-do-not-use-578dc4f6c9e3f302ad839fa011bdf4bf85a5ef9b.zip |
modularized. It compiles, runs, and works for some stuff.
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r-- | perl-install/network/netconnect.pm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 4f34daa84..03b7d7fd5 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -3,7 +3,7 @@ package network::netconnect; use diagnostics; use strict; -use vars qw($in $install $prefix $isdn_init @isdndata %isdnid2type $connect_file $disconnect_file $connect_prog); +use vars qw($isdn_init @isdndata %isdnid2type); use common qw(:common :file :functional :system); use log; @@ -18,11 +18,8 @@ use commands; #require Data::Dumper; use network::tools; -use globals "network", qw($in $prefix $install); +use globals "network", qw($in $prefix $install $connect_file $disconnect_file $connect_prog); -$connect_file = "/etc/sysconfig/network-scripts/net_cnx_up"; -$disconnect_file = "/etc/sysconfig/network-scripts/net_cnx_down"; -$connect_prog = "/etc/sysconfig/network-scripts/net_cnx_pg"; #- intro is called only in standalone. sub intro { @@ -30,6 +27,9 @@ sub intro { my ($netc, $mouse, $intf) = ({}, {}, {}); my $text; my $connected; + my $connect_file = "/etc/sysconfig/network-scripts/net_cnx_up"; + my $disconnect_file = "/etc/sysconfig/network-scripts/net_cnx_down"; + my $connect_prog = "/etc/sysconfig/network-scripts/net_cnx_pg"; read_net_conf($prefix, $netcnx, $netc); if (!$::isWizard) { if (connected($netc)) { @@ -85,7 +85,13 @@ sub detect { sub main { my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $install, $first_time, $direct_fr) = @_; - globals::init(in => $in, prefix => $prefix, install => $install); + globals::init( + in => $in, + prefix => $prefix, + install => $install, + connect_file => "/etc/sysconfig/network-scripts/net_cnx_up", + disconnect_file => "/etc/sysconfig/network-scripts/net_cnx_down", + connect_prog => "/etc/sysconfig/network-scripts/net_cnx_pg" ); $netc->{minus_one}=0; #When one configure an eth in dhcp without gateway $::isInstall and $in->set_help('configureNetwork'); $::isStandalone and read_net_conf($netcnx, $netc); # REDONDANCE with intro. FIXME |