summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service/macosx.rb
Commit message (Collapse)AuthorAgeFilesLines
* Launchd should not load launchagents as root. #5846Mike Dodge2017-08-251-3/+4
| | | | | | | | | The Launchd resource will load launchagents as root when the mac is sitting on the login window. This is never a desired outcome and is hard to recover from. This change now will now check to see if a user is logged in before loading launchagents. Signed-off-by: Mike Dodge <mikedodge04@gmail.com>
* fix master breakagelcg/oopsLamont Granquist2016-12-211-1/+1
| | | | | | pressed merged too fast Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NumericPredicate comparison stylelcg/numericpredicateLamont Granquist2016-12-211-1/+1
| | | | | | | | | | | | | Apparently rubocop thinks the default behavior should be that we have to rewrite every use of `foo == 0` into `foo.zero?` which is a big pile of NOPE for me. After discovering that `.zero?` is actually slower, I'd prefer to go the other direction. Same for `positive?` and `negative?`. These are the only uses of `zero?` in the chef/chef codebase, while I'm pretty sure the inverse rule would touch nearly every file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/NilComparisonLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* chefstyle Style/AndOr fixesLamont Granquist2016-03-141-1/+1
| | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* s/escape_glob/escape_glob_dir/lcg/fix-escape-globLamont Granquist2016-03-101-1/+1
| | | | | Removes all remaining references to the deprecated escape_glob helper routine.
* autofixing whitespace copsLamont Granquist2016-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-14/+14
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* really fix copslcg/really-fix-copsLamont Granquist2016-01-121-2/+2
|
* chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-1/+1
| | | | useless use of `"#{foo.to_s}"`
* Added support for 10.11 and added function for evaluating OS X versions for ↵Nate Walck2015-06-251-1/+5
| | | | future feature gating
* Move resource_name up to Resource, and figure out its value automaticallyJohn Keiser2015-06-011-1/+1
|
* Merge pull request #3051 from mikedodge04/macosx_service_updatePhil Dibowitz2015-04-111-30/+66
|\ | | | | Load LaunchAgents as console user, adding plist and session_type options
| * adding assert for plistMike Dodge2015-04-011-5/+9
| |
| * fix some typos in commentsMike Dodge2015-03-261-2/+1
| |
| * moved around debugsMike Dodge2015-03-261-2/+1
| |
| * added requsted chagnesMike Dodge2015-03-261-4/+9
| |
| * addressed each of the commentsMike Dodge2015-03-251-3/+3
| |
| * removing vim comment (sorry its a habit to add)Mike Dodge2015-03-241-1/+0
| |
| * First pass at fixing the unit testsMike Dodge2015-03-121-6/+7
| |
| * small change to the base user cmdMike Dodge2015-03-101-2/+1
| |
| * Load LaunchAgents as console user, adding plist and session_type optionsMike Dodge2015-03-101-27/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proposed changes to chef mac osx service provider. This adds two resource parameters, @plist and @session_type and changes logic to Load LaunchAgents as Console user @plist: Adds the logic to handle (https://github.com/chef/chef/issues/2200) by Giving the user the option to pass a plist, in the case that the plist name and label name don't match. @session_type to help account launching the service as the console user with a different session type. ( Im a Facebook employee and PhilD will do the final merge. )
* | Modify accesses to HOME to use path_helper instead.Kartik Null Cating-Subramanian2015-03-201-2/+1
|/
* Chef-12 RC Provider ResolverLamont Granquist2014-10-241-0/+2
| | | | | makes resource and provider class resolution more dynamic. begins deprecation of Chef::Platform static mapping.
* Remove requires path_helper from provider class, add to provider subclasses ↵Claire McQuin2014-09-241-0/+1
| | | | using PathHelper.
* Escape path for globbing.Claire McQuin2014-09-221-1/+1
|
* fix shell_out/run_command usageLamont Granquist2014-09-081-2/+2
| | | | | | | | - run_command is deprecated - shell_out! should be used for internal APIs (enable/disable/status) - shell_out_with_systems_locale! should be used for start/stop/restart/reload cases (users will want their software running in their systems locale not our forced en_US.UTF-8 locale)
* add shell_out to base provider codeLamont Granquist2014-07-291-1/+0
|
* Make it possible to include Chef::Provider / Chef::ResourceJohn Keiser2014-04-241-1/+2
| | | | without circular dependencies or missing deps
* Make OS X service resource work when the plist doesn't exist yet.danielsdeleo2014-04-161-1/+5
|
* Add enable/disable to MacOSX service providerPhil Dibowitz2014-03-061-14/+68
| | | | v11 version of #1267
* CHEF-3237 - Incorporated latest review comments.Ringo De Smet2013-05-311-1/+1
|
* CHEF-3237 - Incorporated comments from PR 624Ringo De Smet2013-05-311-4/+3
|
* [CHEF-3237] Fix Mac OS X service provider. Do not fail when HOME is not setIgor Afonov2013-05-311-10/+17
| | | | | * Do not add `~/Library/LaunchAgents` if HOME is not set * It is safe to assume that if HOME is not set ~ will not expand - see rb_home_dir function in MRI ruby
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+144
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!