lib/specinfra/command/solaris/v10/file.rb in specinfra-2.0.0.beta29 vs lib/specinfra/command/solaris/v10/file.rb in specinfra-2.0.0.beta30
- old
+ new
@@ -28,11 +28,11 @@
def check_contain(file, expected_pattern)
"grep -- #{escape(expected_pattern)} #{escape(file)}"
end
- def check_has_md5checksum(file, expected)
- "digest -a md5 -v #{escape(file)} | grep -iw -- #{escape(expected)}"
+ def get_md5sum(file)
+ "digest -a md5 -v #{escape(file)} | cut -d '=' -f 2 | cut -c 2-"
end
# reference: http://perldoc.perl.org/functions/stat.html
def get_mode(file)
"perl -e 'printf \"%o\", (stat shift)[2]&07777' #{escape(file)}"