Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2013-03-01 09:11:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2013-01-20 15:01:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2013-03-01 09:11:26.000000000 +0100 @@ -1,0 +2,18 @@ +Tue Feb 12 14:00:05 CET 2013 - [email protected] + +- AutoYaST: write /etc/hosts even if keep_install_network=true + (bnc#796580) +- AutoYaST: If keep_install_network=true and dns/write_hostname + is unspecified, use the product default (which is false on SLES), + thus not writing 127.0.0.2 to /etc/hosts. (bnc#796580) + (fixing a regression introduced in 2.22.1) +- 2.24.14 + +------------------------------------------------------------------- +Mon Jan 21 20:09:15 UTC 2013 - [email protected] + +- fate#312733 + - nameservers editing supported via CLI +- 2.24.13 + +------------------------------------------------------------------- Old: ---- yast2-network-2.24.12.tar.bz2 New: ---- yast2-network-2.24.14.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.VorY0r/_old 2013-03-01 09:11:27.000000000 +0100 +++ /var/tmp/diff_new_pack.VorY0r/_new 2013-03-01 09:11:27.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 2.24.12 +Version: 2.24.14 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-network-2.24.12.tar.bz2 -> yast2-network-2.24.14.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/Makefile.in new/yast2-network-2.24.14/Makefile.in --- old/yast2-network-2.24.12/Makefile.in 2013-01-18 14:20:45.000000000 +0100 +++ new/yast2-network-2.24.14/Makefile.in 2013-02-26 17:56:29.000000000 +0100 @@ -684,7 +684,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/VERSION new/yast2-network-2.24.14/VERSION --- old/yast2-network-2.24.12/VERSION 2013-01-17 16:13:58.000000000 +0100 +++ new/yast2-network-2.24.14/VERSION 2013-02-12 15:01:36.000000000 +0100 @@ -1 +1 @@ -2.24.12 +2.24.14 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/configure new/yast2-network-2.24.14/configure --- old/yast2-network-2.24.12/configure 2013-01-18 14:20:44.000000000 +0100 +++ new/yast2-network-2.24.14/configure 2013-02-26 17:56:28.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-network 2.24.12. +# Generated by GNU Autoconf 2.69 for yast2-network 2.24.14. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2-network' PACKAGE_TARNAME='yast2-network' -PACKAGE_VERSION='2.24.12' -PACKAGE_STRING='yast2-network 2.24.12' +PACKAGE_VERSION='2.24.14' +PACKAGE_STRING='yast2-network 2.24.14' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1247,7 +1247,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-network 2.24.12 to adapt to many kinds of systems. +\`configure' configures yast2-network 2.24.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1318,7 +1318,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-network 2.24.12:";; + short | recursive ) echo "Configuration of yast2-network 2.24.14:";; esac cat <<\_ACEOF @@ -1398,7 +1398,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-network configure 2.24.12 +yast2-network configure 2.24.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1415,7 +1415,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-network $as_me 2.24.12, which was +It was created by yast2-network $as_me 2.24.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2354,7 +2354,7 @@ # Define the identity of the package. PACKAGE='yast2-network' - VERSION='2.24.12' + VERSION='2.24.14' cat >>confdefs.h <<_ACEOF @@ -2477,7 +2477,7 @@ -VERSION="2.24.12" +VERSION="2.24.14" RPMNAME="yast2-network" MAINTAINER="Michal Filka <[email protected]>" @@ -3403,7 +3403,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-network $as_me 2.24.12, which was +This file was extended by yast2-network $as_me 2.24.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3456,7 +3456,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-network config.status 2.24.12 +yast2-network config.status 2.24.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/configure.in new/yast2-network-2.24.14/configure.in --- old/yast2-network-2.24.12/configure.in 2013-01-18 14:20:42.000000000 +0100 +++ new/yast2-network-2.24.14/configure.in 2013-02-26 17:56:23.000000000 +0100 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-network, 2.24.12, http://bugs.opensuse.org/, yast2-network) +AC_INIT(yast2-network, 2.24.14, http://bugs.opensuse.org/, yast2-network) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.24.12" +VERSION="2.24.14" RPMNAME="yast2-network" MAINTAINER="Michal Filka <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/doc/todo.html new/yast2-network-2.24.14/doc/todo.html --- old/yast2-network-2.24.12/doc/todo.html 2013-01-17 14:24:45.000000000 +0100 +++ new/yast2-network-2.24.14/doc/todo.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,254 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head> -<title>Network Configuration: Things To Do</title> -</head><body bgcolor=#ffffff> - -<!-- Author: Michal Svec <[email protected]> --> -<!-- $Id$ --> -<a name="top"><p> -<h1>Network Configuration: Things To Do</h1> -<hr> - -<!-- ##BODY## --> - -<pre> - -# $Id$ - -<hr> -<!--<h2>Bugs </h2>--> - -<h2>Bugs:</h2> -- KInternet: better helptext (configured + kinternet, cinternet) -- ISDN cleanup (adapt to new sources, better sysconfig) [ISDN] - -<a href="http://bugzilla.suse.de/show_bug.cgi?id=35935">#35935</a> nor yast2 asks for internet test although network config skipped -<a href="http://bugzilla.suse.de/show_bug.cgi?id=37864">#37864</a> nor kinternet not started after dsl config - -- name resolving doesn't work without /etc/resolv.conf (ResolveIP, ag_hostnames) - -- cleanup ifcfg and hwcfg naming -- cleanup NetworkModules -- fix (or delete) all FIXMEs - -<h2>in-progress:</h2> -- [snwint] ifcfg-usb-usb: detected devices (manual adding done, detected missing) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=22739">#22739</a>) -- [zoz] routing: restart only routing (<a href="http://bugzilla.suse.de/show_bug.cgi?id=33025">#33025</a>) - -<hr> -<!--<h2>Features </h2>--> - -<h2>Small Features:</h2> -- host: add (update) all hosts in the local network -- host: scan for hosts on the local network [Add] -- host: show system hosts checkbox (like users have) -- modem: check existence of the modem device in ModemDialog -- routing: summary: print other routes in nice form -- package: include all agents (ag_xauth, ag_resolver, ag_hostnames, ...) -- routing: DHCLIENT_SET_DEFAULT_ROUTE (similar to RESOLV_CONF, HOSTNAME) - -<h2>Large Features:</h2> -- lan: new UI (<a href="http://bugzilla.suse.de/show_bug.cgi?id=29721">#29721</a>, see also <a href="http://bugzilla.suse.de/show_bug.cgi?id=33801">#33801</a>) [sigi] -- proxy: use immediately (<a href="http://bugzilla.suse.de/show_bug.cgi?id=23728">#23728</a>), enhance other programs -- new: IPv6 support (tunnels) -- lan: check IPv6 support is really functional (all fields) -- new: cable connection (slip, plip, ppp, usb) -- hardware: wireless connection (irda, bluetooth) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=35747">#35747</a>) -- support custom provider from INS file (<a href="http://bugzilla.suse.de/show_bug.cgi?id=25774">#25774</a>) -- lan: install required packages: dhcpcd|sysconfig|hotplug|wireless-tools (only if needed, before Write?) -- dialup: don't always ask for the mail config (<a href="http://bugzilla.suse.de/show_bug.cgi?id=31472">#31472</a>) -- lan: ask for the mail config? -- lan: allow configuring a net interface without an IP address (<a href="http://bugzilla.suse.de/show_bug.cgi?id=33801">#33801</a>) -- routing: other fields (see routes(5)) -- modem: speaker volume as combo (or better as slider) -- not only lan: temporary interface disable (<a href="http://bugzilla.suse.de/show_bug.cgi?id=24926">#24926</a>) -- lan: myrinet: check for driver presence [warning + info] - -<hr> -<!--<h2>Old Stuff </h2>--> - -- lan: netcards without a driver (what to do on s390?, warn?) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=29296">#29296</a>) -- lan: compiled in kernel drivers (#???) - offer them besides modularized drivers? src/lan/cards.ycp? - -<h2>Improvements:</h2> -- dns: two resolv.conf scrconfs (resolv.conf.saved.by.dhcpcd, <a href="http://bugzilla.suse.de/show_bug.cgi?id=38834">#38834</a>) XXX? -- lan: check link presence (see sysconfig.rpm how is it done, or was it RH?) -- routing: check already present default route (partially <a href="http://bugzilla.suse.de/show_bug.cgi?id=11132">#11132</a>c26) -- routines: check for yast2-mail presence -- provider: offer to delete provider after device delete if not used (<a href="http://bugzilla.suse.de/show_bug.cgi?id=16094">#16094</a>) -- provider: delete default route if removed (<a href="http://bugzilla.suse.de/show_bug.cgi?id=10739">#10739</a>) -- lan: warn before the network restart (<a href="http://bugzilla.suse.de/show_bug.cgi?id=27137">#27137</a>, <a href="http://bugzilla.suse.de/show_bug.cgi?id=19851">#19851</a>) [WARN] -- lan: yp configuration failed (<a href="http://bugzilla.suse.de/show_bug.cgi?id=25506">#25506</a>) - ask if network should be restarted -- dns: better "DNS and Hostname" and "Hosts" titles (<a href="http://bugzilla.suse.de/show_bug.cgi?id=29722">#29722</a>) -- dns: better message for broken fields (eg. domain) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=22802">#22802</a>) -- lan: ssh installation (install.inf format) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=24836">#24836</a>) - duplicate Alias lines; maybe not necessary, review <a href="http://bugzilla.suse.de/show_bug.cgi?id=22444">#22444</a> -- dialup: mail question only if new device was added - yast ui config XXX? - -<h2>Enhancements:</h2> -- detection (netprobe, dhcpcd) <a href="http://bugzilla.suse.de/show_bug.cgi?id=15489">#15489</a> (see also <a href="http://bugzilla.suse.de/show_bug.cgi?id=7287">#7287</a>, <a href="http://bugzilla.suse.de/show_bug.cgi?id=13200">#13200</a>, <a href="http://bugzilla.suse.de/show_bug.cgi?id=9951">#9951</a>) - <a href="http://bugzilla.suse.de/show_bug.cgi?id=7287">#7287</a>, <a href="http://bugzilla.suse.de/show_bug.cgi?id=13200">#13200</a> are dups of <a href="http://bugzilla.suse.de/show_bug.cgi?id=16471">#16471</a>: take info from linuxrc -- modem: pap|chap secrets writing (isdn may do it already), not sure if it's useful -- providers: no-global-values (ini-agent parameter, ease of use: flat(<a href="http://bugzilla.suse.de/show_bug.cgi?id=21867">#21867</a>)?) -- providers: -> HWDB-NG -- all: edit without restart (reload) -- device: use map instead of variables (-> fill all variables) -- package: require yast2-language, yast2-mail, ... (maybe do that at runtime) -- feature: IP-masquerading (<a href="http://bugzilla.suse.de/show_bug.cgi?id=16131">#16131</a>), is already in the firewall -- routing: default route without GW (<a href="http://bugzilla.suse.de/show_bug.cgi?id=23977">#23977</a>) -- dsl: flat rate (<a href="http://bugzilla.suse.de/show_bug.cgi?id=27840">#27840</a>) -- improve modules.conf options merging (maybe obsolete with 2.6) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=29995">#29995</a>) -- make DHCP options iface-local (questionable) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=30476">#30476</a>) -- edit dsl HW goes through provider again (default provider?) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=24000">#24000</a>) -- allow to change the netcard type (for a broken detection) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=30890">#30890</a>) -- skip detect check box (general yast2 feature) (<a href="http://bugzilla.suse.de/show_bug.cgi?id=31478">#31478</a>) -- installation: better network configuration (inst_netcfg, create_interfaces) -- host: drop oldhostentry file -- host: better deleted hostnames handling - -<hr> -<!--<h2>New Bugs </h2>--> - -<h2>New in Bugzilla:</h2> - -<a href="http://bugzilla.suse.de/show_bug.cgi?id=33071">#33071</a> enh provide a per interface routing configuration -<a href="http://bugzilla.suse.de/show_bug.cgi?id=33649">#33649</a> cri yast2 ISDN module always activates personal firewall -<a href="http://bugzilla.suse.de/show_bug.cgi?id=34626">#34626</a> enh Allow giving a net interface an arbitrary name -<a href="http://bugzilla.suse.de/show_bug.cgi?id=35221">#35221</a> nor LATER Better behavior with multiple dhcp clients -<a href="http://bugzilla.suse.de/show_bug.cgi?id=35638">#35638</a> min On Abort, ask only if there have been any changes -<a href="http://bugzilla.suse.de/show_bug.cgi?id=35671">#35671</a> min Yast2 deletes hostname aliases, if more than one are present -<a href="http://bugzilla.suse.de/show_bug.cgi?id=35955">#35955</a> min LATER Obsolete NETWORK, BROADCAST, NETMASK, UNIQUE in ifcfg -<a href="http://bugzilla.suse.de/show_bug.cgi?id=37520">#37520</a> enh LATER Let user identify ifcfg by MAC, bus id, vpid... -<a href="http://bugzilla.suse.de/show_bug.cgi?id=38213">#38213</a> min YaST network forgets configuration name proposal -<a href="http://bugzilla.suse.de/show_bug.cgi?id=38031">#38031</a> nor Changing network environment causes resolver problems -<a href="http://bugzilla.suse.de/show_bug.cgi?id=38135">#38135</a> min after deleting the only configured modem, yast2-mail is run -<a href="http://bugzilla.suse.de/show_bug.cgi?id=38746">#38746</a> nor dsl config is not working with two network cards -<a href="http://bugzilla.suse.de/show_bug.cgi?id=39027">#39027</a> min LATER "Back" button is interpreted as "Abort" -<a href="http://bugzilla.suse.de/show_bug.cgi?id=40012">#40012</a> enh LATER Allow editing the whole resolver search list -<a href="http://bugzilla.suse.de/show_bug.cgi?id=40254">#40254</a> nor LATER Allow choosing the encoding for passwords -<a href="http://bugzilla.suse.de/show_bug.cgi?id=40458">#40458</a> nor LATER Improve VNC Remote Administration -<a href="http://bugzilla.suse.de/show_bug.cgi?id=40861">#40861</a> enh LATER Add "Test connection" button to proxy etc. config -<a href="http://bugzilla.suse.de/show_bug.cgi?id=41204">#41204</a> enh LATER unconnected network card is assumed to be connected - -<hr> -<!--<h2>Documentation </h2>--> - -<h2>Documentation:</h2> -- example dhcpcd-eth0.info -- example intstall.inf's -- Net-HOWTO link -- s390 devices (see bellow, also from mails) -- overall device overview (see bellow, also required data like IP, RI, NM) -- UIMODE: link to autodocs -- doc: adding network device mini-howto: grep for "escon" for example -- doc: include public_html/network, dia, ... - -<h2>New device type:</h2> -- lan/cards.ycp add type cards (at least one entry) -- lan/hardware.ycp update "device_types" list -- modules/NetworkDevices.ycp update "netcard" list -- routines/complex.ycp add "device_name" to CheckEmptyName -- routines/hardware.ycp update ControllerType (detection) -- routines/summary.ycp add "device_type" to DeviceType - -<h2>Debug (bugzilla):</h2> -- 'hwinfo --all --log hwinfo.log' -- /etc/sysconfig/hardware/hwcfg-* -- /etc/sysconfig/network/ifcfg-* -- /etc/sysconfig/network/ifroute-* -- /var/lib/YaST2/install.inf -- /var/log/YaST2/y2log* - -- /etc/sysconfig/network/providers/* [dialup problems] - -- /etc/sysconfig/network/config -- /etc/sysconfig/network/dhcp -- /etc/sysconfig/network/routes - -- /etc/resolv.conf [DNS problems] - -- /etc/modprobe.conf -- /etc/modprobe.conf.local -- /etc/modprobe.d/* - -- 'ip a' -- /var/log/messages - -<hr> -<!--<h2>Details for some of the above </h2>--> - -<h2>ISDN:</h2> -- code cleanup (use yast2-network structure: Provider, devices, ...) -- UI cleanup (http://w3.suse.de/~sigi/yast2/modules/isdn/81isdn/isdn81_improvement_it01.html) -- isdn: start mail after config (<a href="http://bugzilla.suse.de/show_bug.cgi?id=18256">#18256</a>) - -<h2>WARN:</h2> -- <a href="http://bugzilla.suse.de/show_bug.cgi?id=19851">#19851</a>, <a href="http://bugzilla.suse.de/show_bug.cgi?id=27137">#27137</a> -- warn before rcnetwork restart -> RestartNetwork() || StopNetwork(); -- see routines/runtime.ycp:RunningLocal() - -<hr> -<!--<h2>Ancient Stuff </h2>--> - -<h2>TO-SORT:</h2> - -- all: use rcnetwork reload (but probably only in some cases, things like - remove 2 eth cards and add them in a different order won't work due to - the kernel modules not being unloaded) - * "rcnetwork reload" (if DeletedModules\!=[] "restart") - -- routines: -> FIREWALL=yes|no to each ifcfg-XXX <a href="http://bugzilla.suse.de/show_bug.cgi?id=18840">#18840</a> (support for modems) - -<hr> -<!--<h2>Some details, other stuff, old </h2>--> - -<h2>DOC:</h2> -- doc: dummy: IP/NM/BC -- doc: irlan: IP/NM/BC (eth?) -- doc: irnet: IP/RI (?) -- doc: plip: IP/RI (Parallel Line IP) -- doc: slip: IP/RI (Serial Line IP, obsoleted by PPP) -- doc: ppp: IP/RI (Serial Point-To-Point protocol) - -<h2>UI proposal:</h2> -- detected -- choose your card (current list) -- hw params only (current manual) - -<h2>Hardware:</h2> -- usb: network cabel, ethernet card, TR card, ISDN card, modem -- pcmcia: ethernet card, TR card, ISDN card, modem -- wireless network cards -- fddi card - -- make device optional in routes agent -- DefaultDevice(ip) - check all PPP connections (REMOTEIP) - other devices - - take IP - - if(network(IP) == network(ip)) return x; -- compare with old lan -- where is this used? - -<h2>Modules:</h2> -- see the "*ISDN*" paper - -MODULES=$[]; -> Lan.ycp -DELETED=[]; -> Lan.ycp -ReadModules(); -> M -WriteModules(); <- D,M -Select: C,M -> global vars -AddEdit: global vars -> C,M -Delete: global vars -> C,M,D - -<hr> -<!--<h2>EOF :-) </h2>--> - -</pre> - -<!-- ##BODY## --> - -</body></html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/src/clients/dns.ycp new/yast2-network-2.24.14/src/clients/dns.ycp --- old/yast2-network-2.24.12/src/clients/dns.ycp 2013-01-17 11:26:00.000000000 +0100 +++ new/yast2-network-2.24.14/src/clients/dns.ycp 2013-01-23 16:39:09.000000000 +0100 @@ -58,6 +58,11 @@ include "network/runtime.ycp"; include "network/services/dns.ycp"; +const string HOSTNAME = "hostname"; +const string NAMESERVER_1 = "nameserver1"; +const string NAMESERVER_2 = "nameserver2"; +const string NAMESERVER_3 = "nameserver3"; + /** * Main DNS GUI */ @@ -107,19 +112,76 @@ */ define boolean EditHandler(map<string, string> options) { - string new_hostname = options[ "hostname"]:""; - y2milestone( "Edit handler, options: %1", options); - if( ! Hostname::Check( new_hostname)) - { - CommandLine::Print( _( "Invalid hostname. ") + Hostname::ValidHost() ); - return false; - } + // validator: a reference to boolean( string) is expected + // setter: a reference to void( any) is expected + // fail message: a string is expected + map< string, map< string, any> > option_handlers = $[ + HOSTNAME: $[ + "validator": Hostname::Check, + "setter": SetHostname, + "fail_message": _( "InvalidHostname. ") + Hostname::ValidHost(), + ], + NAMESERVER_1: $[ + "validator": IP::Check, + "setter": SetNameserver1, + "fail_message": _( "Invalid IP. ") + IP::Valid4() + "\n" + IP::Valid6(), + ], + NAMESERVER_2: $[ + "validator": IP::Check, + "setter": SetNameserver2, + "fail_message": _( "Invalid IP. ") + IP::Valid4() + "\n" + IP::Valid6(), + ], + NAMESERVER_3: $[ + "validator": IP::Check, + "setter": SetNameserver3, + "fail_message": _( "Invalid IP. ") + IP::Valid4() + "\n" + IP::Valid6(), + ], + ]; - SetHostname( new_hostname); + const list< string> unmanaged_only_options = [ + NAMESERVER_1, + NAMESERVER_2, + NAMESERVER_3, + ]; - return true; + boolean ret = true; + + foreach( string option, string value, options, + { + if( contains( unmanaged_only_options, option) && NetworkService::IsManaged() ) + { + CommandLine::Print( _("Cannot set ") + option + _(". Network is managed by NetworkManager.")); + + ret = false; + } + + boolean( string) option_validator = ( boolean( string)) option_handlers[ option, "validator"]:nil; + void( any) option_setter = ( void( any)) option_handlers[ option, "setter"]:nil; + string fail_message = ( string) option_handlers[ option, "fail_message"]:_( "Invalid option value."); + + if( ( option_validator == nil) || ( option_setter == nil)) + { + y2internal( "Edit handler: unknown option (%1=%2) or unknown option handlers", option, value); + + CommandLine::Print( _("Internal error") ); + + ret = false; + } + + if( option_validator( value)) + { + option_setter( value); + } + else + { + CommandLine::Print( fail_message); + ret = false; + } + }); + + return ret; } /** @@ -169,14 +231,34 @@ ], ], "options" : $[ - "hostname" : $[ + HOSTNAME : $[ "help" : _( "Used machine hostname"), "type" : "string", "example" : "dns edit hostname=SUSE-host", ], + NAMESERVER_1 : $[ + "help" : _( "IP address of first nameserver."), + "type" : "string", + "example" : "dns edit nameserver1=192.168.0.1", + ], + NAMESERVER_2 : $[ + "help" : _( "IP address of second nameserver."), + "type" : "string", + "example" : "dns edit nameserver2=192.168.0.1", + ], + NAMESERVER_3 : $[ + "help" : _( "IP address of third nameserver."), + "type" : "string", + "example" : "dns edit nameserver3=192.168.0.1", + ], ], "mappings" : $[ - "edit" : [ "hostname" ], + "edit" : [ + HOSTNAME, + NAMESERVER_1, + NAMESERVER_2, + NAMESERVER_3, + ], ], ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/src/clients/lan_auto.ycp new/yast2-network-2.24.14/src/clients/lan_auto.ycp --- old/yast2-network-2.24.12/src/clients/lan_auto.ycp 2013-01-17 10:06:23.000000000 +0100 +++ new/yast2-network-2.24.14/src/clients/lan_auto.ycp 2013-02-12 15:01:36.000000000 +0100 @@ -324,11 +324,21 @@ // copy the keys/values that are not existing in the XML // so we merge the inst-sys settings with the XML while XML // has higher priority + // + // bnc#796580 The problem with this is that due to compatibility with + // older profiles, a missing element may have a different meaning than + // "use what the filesystem/kernel currently uses". + // In particular, a missing write_hostname [1] means + // "use the product default from DVD1/control.xml". + // Other elements may have similar problems, + // to be fixed post-PTF for maintenance. if (! haskey(param, "dns")) { param["dns"] = $[]; } foreach( string key, any value, dns, { - if( ! haskey( param["dns"]:$[], key ) ) { + + if( ! haskey( param["dns"]:$[], key ) + && key != "write_hostname" ) { // [1] ^ y2milestone("(dns) taking %1 from inst-sys. Value = %2", key, value); param["dns",key] = value; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/src/modules/Host.ycp new/yast2-network-2.24.14/src/modules/Host.ycp --- old/yast2-network-2.24.12/src/modules/Host.ycp 2013-01-17 10:06:23.000000000 +0100 +++ new/yast2-network-2.24.14/src/modules/Host.ycp 2013-02-12 15:01:36.000000000 +0100 @@ -186,7 +186,8 @@ * @return true if success */ global define boolean Import(map settings) { - modified = true; + modified = true; // trigger Write + initialized = true; // don't let Read discard our data hosts = eval(settings["hosts"]:$[]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.24.12/src/services/dns.ycp new/yast2-network-2.24.14/src/services/dns.ycp --- old/yast2-network-2.24.12/src/services/dns.ycp 2013-01-17 11:26:00.000000000 +0100 +++ new/yast2-network-2.24.14/src/services/dns.ycp 2013-01-23 16:39:09.000000000 +0100 @@ -180,6 +180,30 @@ } /** + * Function for updating ip address of first nameserver. + */ +define void SetNameserver1( any value) +{ + SetHnItem( "NAMESERVER_1", value); +} + +/** + * Function for updating ip address of second nameserver. + */ +define void SetNameserver2( any value) +{ + SetHnItem( "NAMESERVER_2", value); +} + +/** + * Function for updating ip address of third nameserver. + */ +define void SetNameserver3( any value) +{ + SetHnItem( "NAMESERVER_3", value); +} + +/** * Default function to init the value of a widget. * Used for push buttons. * @param key id of the widget -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
