From 4b4f9f315bc66a6ba4db04e8cdebcccee398f40b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 30 May 2005 11:00:55 +0000 Subject: move netprofile stuff in network::network --- perl-install/network/netconnect.pm | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'perl-install/network/netconnect.pm') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index c2c87866f..58f1d502f 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1524,47 +1524,9 @@ sub main { } } -sub set_profile { - my ($netcnx) = @_; - system('/sbin/set-netprofile', $netcnx->{PROFILE}); - log::explanations(qq(Switching to "$netcnx->{PROFILE}" profile)); -} - -sub save_profile { - my ($netcnx) = @_; - system('/sbin/save-netprofile', $netcnx->{PROFILE}); - log::explanations(qq(Saving "$netcnx->{PROFILE}" profile)); -} - -sub del_profile { - my ($profile) = @_; - return if !$profile || $profile eq "default"; - rm_rf("$::prefix/etc/netprofile/profiles/$profile"); - log::explanations(qq(Deleting "$profile" profile)); -} - -sub add_profile { - my ($netcnx, $profile) = @_; - return if !$profile || $profile eq "default" || member($profile, get_profiles()); - system('/sbin/clone-netprofile', $netcnx->{PROFILE}, $profile); - log::explanations(qq("Creating "$profile" profile)); -} - -sub get_profiles() { - map { if_(m!([^/]*)/$!, $1) } glob("$::prefix/etc/netprofile/profiles/*/"); -} - sub read_net_conf { my ($netcnx, $netc, $intf) = @_; - my $current = { getVarsFromSh("$::prefix/etc/netprofile/current") }; - - $netcnx->{PROFILE} = $current->{PROFILE} || 'default'; network::network::read_all_conf($::prefix, $netc, $intf, $netcnx); - - foreach ('NET_DEVICE', 'NET_INTERFACE') { - $netc->{$_} = $netcnx->{$_} if $netcnx->{$_}; - } - $netcnx->{$netcnx->{type}} ||= {} if $netcnx->{type}; } sub start_internet { -- cgit v1.2.1