From 027d239803146b08081b2475131128e45f936cf8 Mon Sep 17 00:00:00 2001 From: Damien Chaumette Date: Sun, 7 Sep 2003 18:35:48 +0000 Subject: - $netcnx->{PROFILE} is current profile name (now scalar) - fix non working profiles loading/saving - perl_checker --- perl-install/network/netconnect.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'perl-install/network') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 639e1ab6f..14f30a45f 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -277,16 +277,19 @@ fi sub save_conf { my ($netcnx) = @_; my $string = "# Connection type reminder -type=$netcnx->{type} +name=$netcnx->{PROFILE} "; output_with_perm("$prefix/etc/sysconfig/drakconnect", 0600, $string); } sub set_profile { - my ($netcnx, $profile) = @_; - $netcnx->{PROFILE} = $profile; + my ($netcnx) = @_; system("/sbin/set-netprofile $netcnx->{PROFILE}"); +} +sub save_profile { + my ($netcnx) = @_; + system("/sbin/save-netprofile $netcnx->{PROFILE}"); } sub del_profile { @@ -307,9 +310,9 @@ sub get_profiles() { sub load_conf { my ($netcnx, $netc, $intf) = @_; - my $type = { getVarsFromSh("$prefix/etc/sysconfig/drakconnect") }; + my $profile = { getVarsFromSh("$prefix/etc/sysconfig/drakconnect") }; - $type->{type} and $netcnx->{type} = $type->{type}; + $netcnx->{PROFILE} = $profile->{name}; network::read_all_conf($prefix, $netc, $intf); } -- cgit v1.2.1