It appears that with High Sierra, Apple has moved the recovery drive from listing under disk0 when diskutil list is run, to disk1. As a result the current extension attribute in the JSS does not work for reporting the presence of the recovery drive.
I am trying to re write the script to do an OS check then run the necessary command in the interest of only having one extension attribute for this instead of one for less than 10.13 and 10.13 or greater.
However, I am running into some sytax issues. Does anyone see what I have got wrong? Admittedly I am borrowing from other scripts...
#!/bin/sh
# Get the OS we're on
OSversion=`sw_vers | grep ProductVersion`
case $OSversion in
*10.11*)
recoveryHDPresent=`/usr/sbin/diskutil list | grep "Recovery" | grep disk0`
if [ "$recoveryHDPresent" != "" ]; then
echo "<result>Present</result>"
else
echo "<result>Not Present</result>"
;;
*10.12*)
recoveryHDPresent=`/usr/sbin/diskutil list | grep "Recovery" | grep disk0`
if [ "$recoveryHDPresent" != "" ]; then
echo "<result>Present</result>"
else
echo "<result>Not Present</result>"
;;
*10.13*)
recoveryHDPresent=`/usr/sbin/diskutil list | grep "Recovery" | grep disk1`
if [ "$recoveryHDPresent" != "" ]; then
echo "<result>Present</result>"
else
echo "<result>Not Present</result>"
esac