From daace13458d0e144d4d1807dd5390915caea9842 Mon Sep 17 00:00:00 2001 From: smriti Date: Wed, 26 May 2021 14:41:53 +0530 Subject: Mount: device name space character substituted with ascii value Signed-off-by: smriti --- lib/chef/provider/mount/linux.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/chef/provider/mount/linux.rb') diff --git a/lib/chef/provider/mount/linux.rb b/lib/chef/provider/mount/linux.rb index 83fbfab957..899053b613 100644 --- a/lib/chef/provider/mount/linux.rb +++ b/lib/chef/provider/mount/linux.rb @@ -71,6 +71,11 @@ class Chef when /\A#{Regexp.escape(real_mount_point)}\s+#{device_mount_regex}\[/ mounted = true logger.trace("Network device #{device_logstring} mounted as #{real_mount_point}") + # Permalink for network device mounted with a space in device name https://rubular.com/r/CK5zWWms96CRES + # See the comment in "device_with_space_escape" for an explanation what's going here. + when /\A#{Regexp.escape(real_mount_point)}\s+#{device_with_space_escape}\s/ + mounted = true + logger.trace("Network device #{device_logstring} mounted as #{real_mount_point}") end end @current_resource.mounted(mounted) -- cgit v1.2.1