Add check for sv binary (#32250)

* Add check for sv binary

This commit adds a check for the sv binary. If the binary is not present
then the module will fail.

Resolves issue #32248

* Change sv check to suggestion by @bcoca
This commit is contained in:
James Sumners 2017-10-30 09:59:41 -04:00 committed by Brian Coca
parent 9cff2c376b
commit 4a19482413

View file

@ -141,7 +141,7 @@ class Sv(object):
self.pid = None
self.duration = None
self.svc_cmd = module.get_bin_path('sv', opt_dirs=self.extra_paths)
self.svc_cmd = module.get_bin_path('sv', opt_dirs=self.extra_paths, required=True)
self.svstat_cmd = module.get_bin_path('sv', opt_dirs=self.extra_paths)
self.svc_full = '/'.join([ self.service_dir, self.name ])
self.src_full = '/'.join([ self.service_src, self.name ])