Author: lslezak Date: Wed Apr 8 15:30:08 2009 New Revision: 56702 URL: http://svn.opensuse.org/viewcvs/yast?rev=56702&view=rev Log: - write correct IP address to SLP config file when there is no eth0 device (bnc#475676) Modified: branches/tmp/SLE-11-SP1-Stash/instserver/package/yast2-instserver.changes branches/tmp/SLE-11-SP1-Stash/instserver/src/Instserver.ycp Modified: branches/tmp/SLE-11-SP1-Stash/instserver/package/yast2-instserver.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/instserver/package/yast2-instserver.changes?rev=56702&r1=56701&r2=56702&view=diff ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/instserver/package/yast2-instserver.changes (original) +++ branches/tmp/SLE-11-SP1-Stash/instserver/package/yast2-instserver.changes Wed Apr 8 15:30:08 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Mar 18 09:05:43 CET 2009 - lslezak@suse.cz + +- write correct IP address to SLP config file when there is no eth0 + device (bnc#475676) + +------------------------------------------------------------------- Fri Dec 19 12:57:33 CET 2008 - lslezak@suse.cz - do not configure vsftpd in xinetd mode if it's set to standalone Modified: branches/tmp/SLE-11-SP1-Stash/instserver/src/Instserver.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/instserver/src/Instserver.ycp?rev=56702&r1=56701&r2=56702&view=diff ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/instserver/src/Instserver.ycp (original) +++ branches/tmp/SLE-11-SP1-Stash/instserver/src/Instserver.ycp Wed Apr 8 15:30:08 2009 @@ -546,8 +546,16 @@ global string GetIPAddr() { list<map> ifconfig =(list<map>)SCR::Read(.run.ifconfig); - ifconfig = filter(map iface, ifconfig, ``( iface["name"]:"" == "eth0")); - integer ip = ifconfig[0,"value", "inet", "addr"]:0; + list<map> ifc = filter(map iface, ifconfig, ``( iface["name"]:"" == "eth0")); + integer ip = ifc[0,"value", "inet", "addr"]:0; + if (ip == 0) + { + ifc = filter(map iface, ifconfig, ``( iface["name"]:"" != "lo" && !issubstring(iface["name"]:"", "dummy") && iface["value", "inet", "addr"]:0 != 0)); + if (ifc != nil) + { + ip = ifc[0,"value", "inet", "addr"]:0; + } + } return (IP::ToString(ip)); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org