Issue #2513 has been updated by Nigel Kersten. Status changed from Accepted to Ready for Checkin Assigned to changed from Nigel Kersten to James Turnbull Complexity changed from Unknown to Easy
http://github.com/nigelkersten/puppet/tree/tickets/0.25.x/2513 http://github.com/nigelkersten/puppet/commit/c7c3382d1776d4c73a7b5df2586ff0c22a04302c ---------------------------------------- Bug #2513: debian service provider uses hacky enabled? check that fails if insserv is installed http://projects.reductivelabs.com/issues/2513 Author: Nigel Kersten Status: Ready for Checkin Priority: High Assigned to: James Turnbull Category: ssh Target version: 0.25.0 Complexity: Easy Affected version: 0.25.0rc1 Keywords: <pre> def enabled? output = update "-n", "-f", @resource[:name], "remove" # If it's enabled, then it will print output showing removal of # links. if output =~ /etc\/rc[\dS].d\/S|not installed/ return :true else return :false end end </pre> This fails when insserv is installed as the output format changes. We should instead be using something like: <pre>invoke-rc.d --query cron start</pre> This will return 104 if cron would be started in the current runlevel, which means that the init.d script symlink exists for the runlevel. If it returns 101 or 106, then cron is disabled by policy (but the init.d script exists). If it returns 100, then the init.d script does not exist. If it returns 105, then all bets are off. <pre>man invoke-rc.d</pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
