summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-08-13 10:22:57 -0700
committerGitHub <noreply@github.com>2018-08-13 10:22:57 -0700
commit606267f92d21cefaf5e1e7e93db06cd645eaab58 (patch)
tree5a68dd15ca58c80d930d5afb6d884013abd81d7a /lib/chef/provider
parent1d874bf5ef81f884b60284597753cec8de492066 (diff)
parentc51c36c94f039f9da8338dd02a587c458a5f92e5 (diff)
downloadchef-606267f92d21cefaf5e1e7e93db06cd645eaab58.tar.gz
Merge pull request #7529 from chef/lcg/rspec-testing
Run rspec tests within a kitchen container on CentOS 7
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/mount/mount.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb
index 55be15d8c5..7852c8dfdf 100644
--- a/lib/chef/provider/mount/mount.rb
+++ b/lib/chef/provider/mount/mount.rb
@@ -53,6 +53,10 @@ class Chef
def enabled?
# Check to see if there is a entry in /etc/fstab. Last entry for a volume wins.
enabled = false
+ unless ::File.exist?("/etc/fstab")
+ logger.debug "/etc/fstab not found, treating mount as not-enabled"
+ return
+ end
::File.foreach("/etc/fstab") do |line|
case line
when /^[#\s]/