summaryrefslogtreecommitdiff
path: root/lib/chef/provider/mount/mount.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/mount/mount.rb')
-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]/