diff options
author | antima-gupta <agupta@msystechnologies.com> | 2020-08-20 10:09:20 +0530 |
---|---|---|
committer | antima-gupta <agupta@msystechnologies.com> | 2020-08-27 14:10:18 +0530 |
commit | eea7be017e6e4fbf20d050fe0cd7358bfc1503bf (patch) | |
tree | 2998c16c824663d063caa11e233408f87b2f3304 /lib/chef/provider | |
parent | f9a0013089ce29f6ffb853f7303be61577bece32 (diff) | |
download | chef-eea7be017e6e4fbf20d050fe0cd7358bfc1503bf.tar.gz |
Updated the author.
Added comment for mounted? method.
Signed-off-by: antima-gupta <agupta@msystechnologies.com>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/mount/linux.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/provider/mount/linux.rb b/lib/chef/provider/mount/linux.rb index 25a03c08be..919ca118bf 100644 --- a/lib/chef/provider/mount/linux.rb +++ b/lib/chef/provider/mount/linux.rb @@ -1,5 +1,5 @@ # -# Author:: Joshua Timberman (<joshua@chef.io>) +# Author:: Antima Gupta (<agupta@chef.io>) # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 # @@ -25,12 +25,14 @@ class Chef provides :mount, os: "linux" + # Check to see if the volume is mounted. + # "findmnt" outputs the mount points with volume. + # Convert the mount_point of the resource to a real path in case it + # contains symlinks in its parents dirs. + def mounted? mounted = false - # "mount" outputs the mount points as real paths. Convert - # the mount_point of the resource to a real path in case it - # contains symlinks in its parents dirs. real_mount_point = if ::File.exists? @new_resource.mount_point ::File.realpath(@new_resource.mount_point) else |