Skip to main content

I am trying to create an extension attribute that detects the presence of an installer package cached in the Waiting Room. I can run the script manually in terminal and get a true or false result. When I place the script in the extension attribute, I get no result returned. The script:



if [ -e /Library/Application Support/JAMF/Waiting Room/*.pkg.cache.xml ]
then
echo "true"
else
echo "false"
fi



What am I doing wrong?

Your echo statements need to be like this:



echo "<result>true</result>"


You're missing the <result></result> tags. So your script would be:



#!/bin/sh
if [ -e /Library/Application Support/JAMF/Waiting Room/*.pkg.cache.xml ]
then
echo "<result>true</result>"
else
echo "<result>false</result>"
fi

Thank you Steve. That is exactly what I needed!