Posted on 11-09-2012 11:42 AM
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?
Solved! Go to Solution.
Posted on 11-09-2012 11:48 AM
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
Posted on 11-09-2012 11:48 AM
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
Posted on 11-09-2012 12:00 PM
Thank you Steve. That is exactly what I needed!