summaryrefslogtreecommitdiff
path: root/lib/chef/platform
Commit message (Collapse)AuthorAgeFilesLines
* Require mixin::shellout where we use itrequire_shelloutTim Smith2018-10-271-0/+1
| | | | | | We're not requiring it here even though we extend it below. Signed-off-by: Tim Smith <tsmith@chef.io>
* Move the older_than_win_2012_or_8? to platform_introspectionTim Smith2018-07-061-6/+0
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Prevent failures using windows_feature due to the platform helperTim Smith2018-07-061-1/+1
| | | | | | node isn't available within the helper. Lets use the same hack we use in docker? to pass it in automatically. Signed-off-by: Tim Smith <tsmith@chef.io>
* Move the windows helper to query_helpersTim Smith2018-06-091-0/+6
| | | | | | Fix my typo too Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove support for Windows 20032k3Tim Smith2018-03-021-12/+0
| | | | | | Windows 2003 is fully end of life at this point and hasn't been supported by Chef for quite a while. EXTENDED support for Windows 2003 ended July 14, 2015. We avoid a good number of WMI queries by removing this support entirely. Signed-off-by: Tim Smith <tsmith@chef.io>
* fix rebooter for solaris and background rebootsfix-linux-rebooterLamont Granquist2017-10-131-3/+7
| | | | | | closes #5026 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Prefer Systemd with sysvinit script over Upstart for service providerGrant Ridder2017-05-151-1/+1
| | | | | | On newer Debian based systems that use systemd to have a package install a SysV init and Upstart script. Systemd can use systemd service files or SysV init scripts. However, on the Chef serivce provider side, this is not reflected. So in this case, Upstart will be prefered even if Upstart itself is not installed on the system. Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
* use rfc exit codesSteven Murawski2017-04-041-2/+1
| | | | Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
* this mixin also seems unused nowLamont Granquist2017-03-171-3/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: remove Chef::Platform.set and related methodsLamont Granquist2017-03-171-165/+1
| | | | | | Switch over the Chef-12.0 ProviderResolver is now completed. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-132-7/+7
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix chef_platform_methods deprecation class nameBill Ruddock2017-02-081-6/+6
| | | | | | | | | | | | | | | Deprecation warnings for Chef::Platform methods introduced in #5631 were logged as e.g. `"Class.set is deprecated"` instead of `"Chef::Platform.set is deprecated"` This gets correct class name for message and adds unit specs to cover the expected deprecation messages. Unfortunately for these specs, some of these methods use each other, resulting in multiple warnings. I have put an expectation for each of these to avoid masking any other deprecations. Signed-off-by: Bill Ruddock <bill.ruddock@gmail.com>
* Merge pull request #5636 from chef/lcg/remove-chef-platform-handler-classBryan McLellan2016-12-133-44/+4
|\ | | | | remove Chef::Platform::HandlerMap
| * remove Chef::Platform::HandlerMaplcg/remove-chef-platform-handler-classLamont Granquist2016-12-083-44/+4
| | | | | | | | | | | | seems like an entirely unnecessary level of indirection Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Properly deprecate old Chef::Platform methodsLamont Granquist2016-12-071-0/+5
|/ | | | | | | | These should have been deprecated formally in 12.5.1 after the Dynamic Provider-Resolver'ing of the internal chef resources was completed. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Ensures correct version of shutdown is called when using the reboot resource ↵Christoph2016-12-061-1/+3
| | | | | | | | on Windows (#5596) Use a fixed path to shutdown.exe on windows in Chef::Platform::Rebooter, fixes #5594 Signed-off-by: Christoph Griesshammer <cgriesshammer@gmail.com>
* fixing Style/MultilineTernaryOperator copLamont Granquist2016-08-161-2/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* * define exit codesSteven Murawski2016-05-231-2/+13
| | | | | | | | | | | | * exit code functional specs * audit exit codes * reboot now/reboot failed/reboot pending exit codes * Deal with forked and unforked process and get the right exit code * Reboot Now should really be reboot scheduled * pass exception rather than exit code * updated with sigint and sigterm * support legacy fatal!("", 2) behavior * fixup all fatal! and exit! calls
* Set inherit=false on the fallback constant lookup.Noah Kantrowitz2016-03-241-2/+2
| | | | This prevents really weirdo behavior with relative constant lookups like `Chef::Provider.const_get('Resource')` == `ChefVaultCookbook::Resource`.
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-192-2/+2
| | | | no enforced trailing comma on arguments...
* deal with 0.37.2 renamed copsLamont Granquist2016-02-182-9/+9
| | | | | | | | | | | | | | | 252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
* convert MultilineOperationIndentation style to "indented"Lamont Granquist2016-02-121-2/+2
| | | | this looks nicer.
* autofixing whitespace copsLamont Granquist2016-02-054-24/+23
| | | | | | | | | | | | | | | | | | | | | | 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
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-023-3/+3
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-024-4/+4
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-028-8/+8
| | | 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"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-2/+2
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-1410-28/+28
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-4/+4
| | | | chefstyle -a fixed 1044 occurrances
* really fix copslcg/really-fix-copsLamont Granquist2016-01-121-6/+6
|
* chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-1/+1
| | | | useless use of `"#{foo.to_s}"`
* WMF 5 RTM and Win 10 Threshold 2 allow the RefreshMode to be enabled.Steven Murawski2015-11-181-3/+14
|
* support split-usr on ubuntu platformsNathan Williams2015-10-231-2/+2
|
* fix specsNathan Williams2015-10-231-2/+2
|
* move gross non-service "services" to separate detection methodNathan Williams2015-10-231-5/+13
|
* re-sync with masterNathan Williams2015-10-232-25/+72
|\
| * Make service_providers return the providersJohn Keiser2015-09-281-6/+10
| |
| * Get rid of state-keeping and reset in ServiceHelpersjk/systemctl-shenanigansJohn Keiser2015-09-281-31/+19
| |
| * Add test for nonzero systemctl exit codeJohn Keiser2015-09-281-11/+12
| |
| * Add system providers to the list of world-stubbed stuffJohn Keiser2015-09-281-0/+5
| |
| * return empty array if no services foundRanjib Dey2015-09-281-1/+1
| |
| * Lazy load MSI provider, add check for MSI supportsalam/lazy-msiSalim Alam2015-09-221-0/+16
| |
| * Don't add win_evt logger when on nano.Claire McQuin2015-09-181-1/+23
| |
| * Rename refresh_mode_disabled? to dsc_refresh_mode_disabled?mcquin/dsc_resource_specClaire McQuin2015-09-081-1/+1
| |
| * Skip tests unless RefreshMode is DisabledClaire McQuin2015-09-081-0/+7
| |
* | add support for non-service unitsNathan Williams2015-09-011-1/+2
| |
* | support service names like redis@6380 derived from units like redis@.serviceNathan Williams2015-08-291-1/+1
| |
* | Revert "include systemd in configs if init.d on systemd-based system"Nathan Williams2015-08-281-1/+0
| | | | | | | | | | | | I'm not actually sure where this is used, so maybe leave it be. This reverts commit 5a78ea32aaaee75265086c27d273f5c7dc1c111e.
* | include systemd in configs if init.d on systemd-based systemNathan Williams2015-08-281-0/+1
| |
* | ::FileNathan Williams2015-08-281-1/+1
| |