Mac Managed Software Delivery now includes Detection or Compliance rules. Often, it is helpful to verify the packages installed on mac clients. The default command is to find the package name, then run 'pkgutil ---pkginfo <pkg name>'. It's a bit difficult to do this for every component of a package.
The following script simplifies listing pkg info. It defaults to search for package with 'altiris' in the name. If you put any other string in the command line, it will search for that, instead.
I named it 'pkgutilx' and put in the mac's /usr/sbin/ directory so it's available from anywhere.
======================================================================== #!/bin/sh
# mac only
curName=$1 if [ -z $curName ]; then curName='altiris' fi
echo echo 'Installed Packages' echo '===================================' pkglist=`pkgutil --packages | grep -i $curName` echo "$pkglist" echo echo 'Package Details...' echo '==================================='
for i in $pkglist; do echo "`pkgutil --pkg-info $i`" echo done echo '===================================' echo ========================================================================
Also, pretty sure /usr/sbin is off limits on 10.11.x and higher, so it is probably better to save it to /usr/local/sbin instead to make it future proof.
Would love to see an article or documentation detailing how the detection rules actually work, (or don't work) on Mac. We've had very limited success in utilizing them.