saltstack/salt — pull request #14022 by johngrasty (2014-07-08 06:33:19+00:00)
Title: Update smf.py to fix availability check on SmartOS

This addresses issue #13983.

Checking availability uses the services name, not the package name. The get_all function (which is used by available and missing functions) returns the service name. While to install the package, you need the package name. For example, for nginx, you have pkgsrc/nginx for the service name and nginx for the package name.

`/usr/bin/svcs -H -o SVC ` will take the package name and return abbreviated service name which can then be compared against the service list returned by the get_all function.

This fix works on SmartOS, but it was not compared to other SMF distributions. Therefore, the fix was confined to SmartOS.