Created
August 6, 2014 15:42
-
-
Save jacobsalmela/0d6ce2a1145ff63b6c63 to your computer and use it in GitHub Desktop.
Extension Attribute to check if the root volume is named Macintosh HD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
volumeName=$(diskutil info / | awk '/Volume Name/ {print substr ($0, index ($0,$3))}') | |
if [ "$volumeName" != "Macintosh HD" ];then | |
echo "<result>Incorrect</result>" | |
else | |
echo "<result>Correct</result>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment