diff options
author | Scott Hain <shain@chef.io> | 2017-11-16 11:40:07 -0800 |
---|---|---|
committer | Scott Hain <shain@chef.io> | 2017-11-16 12:20:28 -0800 |
commit | 4ea68802a17735e8938339fd03f7fe41b1fa1ca2 (patch) | |
tree | a1e1280c09df8c73380fa6fedc5f9fe10a06a0c3 | |
parent | a073871748ea5d93b4f39d517447e56c6801414b (diff) | |
download | chef-4ea68802a17735e8938339fd03f7fe41b1fa1ca2.tar.gz |
Add creation of ramdisk node if it doesn't already exist
Signed-off-by: Scott Hain <shain@chef.io>
-rw-r--r-- | spec/functional/resource/mount_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/functional/resource/mount_spec.rb b/spec/functional/resource/mount_spec.rb index fa943f4031..c98d6cec25 100644 --- a/spec/functional/resource/mount_spec.rb +++ b/spec/functional/resource/mount_spec.rb @@ -44,6 +44,10 @@ describe Chef::Resource::Mount, :requires_root, :skip_travis, :external => inclu fstype = "namefs" when "debian", "rhel", "amazon" device = "/dev/ram1" + unless File.exist?(device) + shell_out("mknod -m 660 #{device} b 1 0") + shell_out("chown root:disk #{device}") + end shell_out("ls -1 /dev/ram*").stdout.each_line do |d| if shell_out("mount | grep #{d}").exitstatus == "1" # this device is not mounted, so use it. |