fix: check if zfs-cache exists and isnt empty #409

Merged
unkinben merged 1 commits from benvin/zfs_cache_service into develop 2025-10-18 21:15:55 +11:00

View File

@ -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