Mailinglist Archive: yast-commit (396 mails)

< Previous Next >
[yast-commit] r65339 - in /trunk/network: src/lan/YaPI/NETWORK.pm testsuite/tests/Network_YaPI.out
Author: mvidner
Date: Fri Aug 12 16:46:54 2011
New Revision: 65339

URL: http://svn.opensuse.org/viewcvs/yast?rev=65339&view=rev
Log:
YaPI Read: Don't append a slash to ipaddr like '1.2.3.4/8/'

Happened on a write-read round trip.
Reported by Justus Winter,
http://lists.opensuse.org/yast-devel/2011-07/msg00037.html

Modified:
trunk/network/src/lan/YaPI/NETWORK.pm
trunk/network/testsuite/tests/Network_YaPI.out

Modified: trunk/network/src/lan/YaPI/NETWORK.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/YaPI/NETWORK.pm?rev=65339&r1=65338&r2=65339&view=diff
==============================================================================
--- trunk/network/src/lan/YaPI/NETWORK.pm (original)
+++ trunk/network/src/lan/YaPI/NETWORK.pm Fri Aug 12 16:46:54 2011
@@ -38,7 +38,11 @@
%configuration = ( 'bootproto' => LanItems->bootproto );
} elsif (LanItems->bootproto eq "static"){
%configuration = ( 'bootproto' => 'static' );
- $configuration{'ipaddr'} = LanItems->ipaddr . "/" .
LanItems->prefix;
+
+ $configuration{'ipaddr'} = LanItems->ipaddr;
+ if (LanItems->prefix ne "") {
+ $configuration{'ipaddr'} .= "/" . LanItems->prefix
+ }
}
$interfaces{LanItems->interfacename}=\%configuration;
} elsif (LanItems->getCurrentItem()->{'hwinfo'}->{'type'} eq "eth") {

Modified: trunk/network/testsuite/tests/Network_YaPI.out
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/network/testsuite/tests/Network_YaPI.out?rev=65339&r1=65338&r2=65339&view=diff
==============================================================================
--- trunk/network/testsuite/tests/Network_YaPI.out (original)
+++ trunk/network/testsuite/tests/Network_YaPI.out Fri Aug 12 16:46:54 2011
@@ -84,4 +84,4 @@
Read .target.lstat "/etc/sysconfig/network/ifcfg-tr-usb" nil
Execute .target.bash_output "hostname --fqdn" $["exit":0,
"stdout":"laptop.suse.cz"]
Execute .target.bash_output "hostname --fqdn" $["exit":0,
"stdout":"laptop.suse.cz"]
-Return $["dns":$["nameservers":["208.67.222.222", "208.67.220.220"],
"searches":["suse.cz", "suse.de"]], "hostname":$["dhcp_hostname":"1",
"domain":"suse.cz", "name":"laptop"],
"interfaces":$["eth0":$["bootproto":"dhcp4"], "eth1":$["bootproto":"static",
"ipaddr":"1.2.3.4/24"], "eth2":$["bootproto":"static", "ipaddr":"1.2.3.5/24"],
"eth3":$["bootproto":"static", "ipaddr":"1.2.3.7/24/"],
"eth4":$["bootproto":"static", "ipaddr":"1.2.3.7/24"]],
"routes":$["default":$["via":"10.20.30.40"]]]
+Return $["dns":$["nameservers":["208.67.222.222", "208.67.220.220"],
"searches":["suse.cz", "suse.de"]], "hostname":$["dhcp_hostname":"1",
"domain":"suse.cz", "name":"laptop"],
"interfaces":$["eth0":$["bootproto":"dhcp4"], "eth1":$["bootproto":"static",
"ipaddr":"1.2.3.4/24"], "eth2":$["bootproto":"static", "ipaddr":"1.2.3.5/24"],
"eth3":$["bootproto":"static", "ipaddr":"1.2.3.7/24"],
"eth4":$["bootproto":"static", "ipaddr":"1.2.3.7/24"]],
"routes":$["default":$["via":"10.20.30.40"]]]

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages