fix: check if zfs-cache exists and isnt empty
All checks were successful
Build / precommit (pull_request) Successful in 4m56s
All checks were successful
Build / precommit (pull_request) Successful in 4m56s
- check the cache file exists, and isnt empty - resolves idempotence for zpool-import-cache service
This commit is contained in:
parent
98b866fce7
commit
1375e7db7c
@ -3,7 +3,8 @@
|
||||
Facter.add('zfs_zpool_cache_present') do
|
||||
confine kernel: 'Linux'
|
||||
setcode do
|
||||
File.exist?('/etc/zfs/zpool.cache')
|
||||
cache_file = '/etc/zfs/zpool.cache'
|
||||
File.exist?(cache_file) && File.size(cache_file).positive?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user