[yast-commit] r42554 - in /branches/SuSE-SLE-10-SP2-Branch/yast2: VERSION library/network/src/NetworkService.ycp package/yast2.changes
Author: mzugec Date: Fri Nov 30 13:54:08 2007 New Revision: 42554 URL: http://svn.opensuse.org/viewcvs/yast?rev=42554&view=rev Log: added function NetworkService::isNetworkRunning() Modified: branches/SuSE-SLE-10-SP2-Branch/yast2/VERSION branches/SuSE-SLE-10-SP2-Branch/yast2/library/network/src/NetworkService.ycp branches/SuSE-SLE-10-SP2-Branch/yast2/package/yast2.changes Modified: branches/SuSE-SLE-10-SP2-Branch/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/yast2/VERSION?rev=42554&r1=42553&r2=42554&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/yast2/VERSION (original) +++ branches/SuSE-SLE-10-SP2-Branch/yast2/VERSION Fri Nov 30 13:54:08 2007 @@ -1 +1 @@ -2.13.105 +2.13.106 Modified: branches/SuSE-SLE-10-SP2-Branch/yast2/library/network/src/NetworkService.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/yast2/library/network/src/NetworkService.ycp?rev=42554&r1=42553&r2=42554&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/yast2/library/network/src/NetworkService.ycp (original) +++ branches/SuSE-SLE-10-SP2-Branch/yast2/library/network/src/NetworkService.ycp Fri Nov 30 13:54:08 2007 @@ -128,5 +128,19 @@ } } +global boolean isNetworkRunning(){ + map output = (map)SCR::Execute(.target.bash_output, + "([ $(ip addr|grep -v '127.0.0.1'|grep -c inet) != '0' ] && echo 'network') || echo 'no net'"); + if (issubstring(output["stdout"]:"", "network")) { + y2milestone ("Network is running ..."); + return true; + } else { + y2milestone("Network is not running ..."); + return false; + } + +} + + /* EOF */ } Modified: branches/SuSE-SLE-10-SP2-Branch/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/yast2/package/yast2.changes?rev=42554&r1=42553&r2=42554&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/yast2/package/yast2.changes (original) +++ branches/SuSE-SLE-10-SP2-Branch/yast2/package/yast2.changes Fri Nov 30 13:54:08 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Nov 30 13:53:24 CET 2007 - mzugec@suse.cz + +- added function NetworkService::isNetworkRunning() +- 2.13.106 + +------------------------------------------------------------------- Thu Nov 29 13:10:33 CET 2007 - mzugec@suse.cz - for AY Confirm::Detection popup has timeout 10 seconds (#192181) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org