lib/specinfra/command/freebsd.rb in specinfra-1.22.1 vs lib/specinfra/command/freebsd.rb in specinfra-1.23.0

- old
+ new

@@ -21,9 +21,23 @@ def check_mode(file, mode) regexp = "^#{mode}$" "stat -f%Lp #{escape(file)} | grep -- #{escape(regexp)}" end + def check_owner(file, owner) + regexp = "^#{owner}$" + "stat -f%Su #{escape(file)} | grep -- #{escape(regexp)}" + end + + def check_grouped(file, group) + regexp = "^#{group}$" + "stat -f%Sg #{escape(file)} | grep -- #{escape(regexp)}" + end + + def check_link(link, target) + "stat -f%Y #{escape(link)} | grep -- #{escape(target)}" + end + def get_mode(file) "stat -f%Lp #{escape(file)}" end def install(package)