Last active
April 27, 2016 15:48
-
-
Save jmahlman/f4b34c0e3447387c12676e9bfe7bdeca to your computer and use it in GitHub Desktop.
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/sh | |
# | |
# | |
# I wrote this simple script because we wanted to rename our Parallels VMs to the local Mac hostname | |
# We set the VM to automatically log into an admin account and run a powershell script to get the name | |
# from this file and rename the machine. It then enables autologin for the student account and reboots | |
# | |
# | |
if [ ! -d /Users/Shared ]; then | |
mkdir /Users/Shared | |
fi | |
localName='scutil --get LocalHostName' | |
$localName | head -c 12 > /Users/Shared/hostname | |
chmod 777 /Users/Shared/hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment