mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
support freebsd in test cookbook
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
20567b9f51
commit
5b336f2c87
1 changed files with 7 additions and 4 deletions
|
@ -1,21 +1,24 @@
|
|||
# preparation
|
||||
gid = 'root'
|
||||
gid = 'wheel' if node['platform_family'] == 'freebsd'
|
||||
|
||||
file '/tmp/file' do
|
||||
mode '0765'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
group gid
|
||||
content 'hello world'
|
||||
end
|
||||
|
||||
directory '/tmp/folder' do
|
||||
mode '0567'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
group gid
|
||||
end
|
||||
|
||||
link '/tmp/symlink'do
|
||||
to '/tmp/file'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
group gid
|
||||
mode '0777'
|
||||
end
|
||||
|
||||
|
@ -25,7 +28,7 @@ execute 'create pipe/fifo' do
|
|||
end
|
||||
|
||||
execute 'create block_device' do
|
||||
command 'mknod /tmp/block_device b 7 7 && chmod 0666 /tmp/block_device && chown root:root /tmp/block_device'
|
||||
command "mknod /tmp/block_device b 7 7 && chmod 0666 /tmp/block_device && chown root:#{gid} /tmp/block_device"
|
||||
not_if 'test -e /tmp/block_device'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue