Author: mzugec
Date: Thu Sep 24 09:40:10 2009
New Revision: 58737
URL: http://svn.opensuse.org/viewcvs/yast?rev=58737&view=rev
Log:
revert previous patch
Modified:
branches/SuSE-Code-11-Branch/network/VERSION
branches/SuSE-Code-11-Branch/network/package/yast2-network.changes
branches/SuSE-Code-11-Branch/network/src/lan/Makefile.am
branches/SuSE-Code-11-Branch/network/src/lan/YaPI/NETWORK.pm
Modified: branches/SuSE-Code-11-Branch/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/network/VERSION?rev=58737&r1=58736&r2=58737&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/network/VERSION (original)
+++ branches/SuSE-Code-11-Branch/network/VERSION Thu Sep 24 09:40:10 2009
@@ -1 +1 @@
-2.17.79
+2.17.78
Modified: branches/SuSE-Code-11-Branch/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/network/package/yast2-network.changes?rev=58737&r1=58736&r2=58737&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/network/package/yast2-network.changes (original)
+++ branches/SuSE-Code-11-Branch/network/package/yast2-network.changes Thu Sep 24 09:40:10 2009
@@ -1,10 +1,4 @@
-------------------------------------------------------------------
-Mon Sep 21 10:29:30 CEST 2009 - mzugec@suse.cz
-
-- YaPI: backported NETWORK.pm for webYaST
-- 2.17.79
-
--------------------------------------------------------------------
Tue Jul 7 16:01:52 CEST 2009 - kmachalkova@suse.cz
- Editing /etc/hosts via host module adjusted to cope with hosts
Modified: branches/SuSE-Code-11-Branch/network/src/lan/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/network/src/lan/Makefile.am?rev=58737&r1=58736&r2=58737&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/network/src/lan/Makefile.am (original)
+++ branches/SuSE-Code-11-Branch/network/src/lan/Makefile.am Thu Sep 24 09:40:10 2009
@@ -7,10 +7,4 @@
yncludedir = @yncludedir@/network/lan
ynclude_DATA = $(wildcard *.ycp)
-YaPI_perldir = @moduledir@/YaPI
-
-YaPI_perl_DATA = \
- YaPI/NETWORK.pm
-
-
-EXTRA_DIST = $(ynclude_DATA) $(YaPI_perl_DATA)
+EXTRA_DIST = $(ynclude_DATA)
Modified: branches/SuSE-Code-11-Branch/network/src/lan/YaPI/NETWORK.pm
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/network/src/lan/YaPI/NETWORK.pm?rev=58737&r1=58736&r2=58737&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/network/src/lan/YaPI/NETWORK.pm (original)
+++ branches/SuSE-Code-11-Branch/network/src/lan/YaPI/NETWORK.pm Thu Sep 24 09:40:10 2009
@@ -1,137 +0,0 @@
-package YaPI::NETWORK;
-
-use strict;
-use YaST::YCP qw(:LOGGING);
-use YaPI;
-use Data::Dumper;
-use Switch;
-
-# ------------------- imported modules
-YaST::YCP::Import ("LanItems");
-YaST::YCP::Import ("Hostname");
-YaST::YCP::Import ("DNS");
-YaST::YCP::Import ("Routing");
-# -------------------------------------
-
-our $VERSION = '1.0.0';
-our @CAPABILITIES = ('SLES11');
-our %TYPEINFO;
-
-# TODO: parameter map what_I_Need
-BEGIN{$TYPEINFO{Read} = ["function",
- [ "map", "string", "any"]];
-}
-sub Read {
- my $self = shift;
-
-# Hostname->Read();
- DNS->Read();
- Routing->Read();
- LanItems->Read();
-
- my %interfaces = ();
- foreach my $devnum (keys %{LanItems->Items}){
- LanItems->current($devnum);
- if (LanItems->IsItemConfigured()){
- my %configuration = ();
- LanItems->SetItem();
- if (LanItems->isCurrentDHCP()){
- %configuration = ( 'bootproto' => LanItems->bootproto );
- } elsif (LanItems->bootproto eq "static"){
- %configuration = ( 'bootproto' => 'static' );
- %configuration->{'ipaddr'} = LanItems->ipaddr . "/" . LanItems->prefix;
- }
- $interfaces{LanItems->interfacename}=\%configuration;
- } elsif (LanItems->getCurrentItem()->{'hwinfo'}->{'type'} eq "eth") {
- $interfaces{%{LanItems->getCurrentItem()}->{"hwinfo"}->{"dev_name"}}= {};
- }
- }
-
- #FIXME: validate for nil values (dns espacially)
- my %ret = ('interfaces'=>\%interfaces,
- 'routes'=>{'default'=>{'via'=>Routing->GetGateway()}},
- 'dns'=>{'nameservers'=>\@{DNS->nameservers}, 'searches'=>\@{DNS->searchlist}},
- 'hostname'=>{'name'=>Hostname->CurrentHostname, 'domain'=>Hostname->CurrentDomain}
- );
- return \%ret;
-}
-
-BEGIN{$TYPEINFO{Write} = ["function",
- "boolean",["map","string","any"]];
-}
-sub Write {
- my $self = shift;
- my $args = shift;
- y2milestone("YaPI->Write with settings:", Dumper(\$args));
- # SAVE DEFAULT ROUTE
- if (exists($args->{'route'})){
- my $gw="";
- my $dest="";
- my @route = ();
- if (defined ($args->{'route'}->{'default'}->{'via'})){
- $gw = $args->{'route'}->{'default'}->{'via'};
- if ($gw ne ""){
- $dest = "default";
- @route = ( {"destination" => $dest,
- "gateway" => $gw,
- "netmask" => "-",
- "device" => "-"
- });
- }
- }
- Routing->Read();
- y2milestone("YaPI->Write before change Routes:", Dumper(Routing->Routes));
- Routing->Routes( \@route );
- y2milestone("YaPI->Write after change Routes:", Dumper(Routing->Routes));
- Routing->Write();
- }
- # SAVE HOSTNAME
- if (exists($args->{'hostname'})){
- y2milestone("hostname", Dumper(\$args->{'hostname'}));
- DNS->Read();
- DNS->hostname($args->{'hostname'}->{'name'});
- DNS->domain($args->{'hostname'}->{'domain'});
- DNS->modified(1);
- DNS->Write();
- }
- # SAVE DNS Settings
- if (exists($args->{'dns'})){
- y2milestone("dns", Dumper(\$args->{'dns'}));
- DNS->Read();
- DNS->nameservers($args->{'dns'}->{'nameservers'});
- DNS->searchlist($args->{'dns'}->{'searches'});
- DNS->modified(1);
- DNS->Write();
- }
- # SAVE DNS Settings
- if (exists($args->{'interface'})){
- y2milestone("interface", Dumper(\$args->{'interface'}));
- foreach my $dev (keys %{$args->{'interface'}}){
-# YaST::YCP::Import ("LanItems");
-# LanItems->Read();
-# foreach my $iface (keys %{LanItems->Items}){
-# LanItems->current($iface);
-# LanItems->DeleteItem();
-# }
-# LanItems->Write();
- YaST::YCP::Import ("NetworkInterfaces");
- NetworkInterfaces->Read();
- NetworkInterfaces->Add() if NetworkInterfaces->Edit($dev) ne 1;
- NetworkInterfaces->Name($dev);
- my %config=("STARTMODE" => "auto",
- "BOOTPROTO" => $args->{'interface'}->{$dev}->{'bootproto'},
- "IPADDR" => $args->{'interface'}->{$dev}->{'ipaddr'}
- );
- NetworkInterfaces->Current(\%config);
- NetworkInterfaces->Commit();
- NetworkInterfaces->Write("");
- YaST::YCP::Import ("Service");
- Service->Restart("network");
- }
-
- }
-
- return 1;
-}
-
-1;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org