Author: lslezak Date: Fri Sep 9 14:30:02 2011 New Revision: 65637 URL: http://svn.opensuse.org/viewcvs/yast?rev=65637&view=rev Log: make Service::Enabled() behavior backward compatible (check any runlevel as before instead of hardcoded 3) Modified: trunk/yast2/library/runlevel/src/Service.ycp Modified: trunk/yast2/library/runlevel/src/Service.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/runlevel/src/Service.ycp?rev=65637&r1=65636&r2=65637&view=diff ============================================================================== --- trunk/yast2/library/runlevel/src/Service.ycp (original) +++ trunk/yast2/library/runlevel/src/Service.ycp Fri Sep 9 14:30:02 2011 @@ -277,16 +277,16 @@ } /** - * Check if service is enabled (in RL 3 or multi-user.target) + * Check if service is enabled (in any runlevel) * - * Forwards to chkconfig -c which decides between init and systemd + * Forwards to chkconfig -l which decides between init and systemd * * @param name service name - * @return true if service is set to run + * @return true if service is set to run in any runlevel */ global define boolean Enabled (string name) { if(!checkExists (name)) return false; - return 0 == SCR::Execute (.target.bash, sformat ("/sbin/chkconfig -c %1 3", name)); + return 0 == SCR::Execute (.target.bash, sformat ("/sbin/chkconfig -l %1 | /usr/bin/grep -q '[0-6]:on'", name)); } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org