/build/static/layout/Breadcrumb_cap_w.png

Mac name pop up pre-installation task

Does anyone have a pre-installation and mid-level tasks to prompt for a Mac computer name and apply it as part of the deployment process? We have these already scripted for Windows deployment and are looking to add this to the Mac process as well.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: WooLian 6 years ago
Yellow Belt
0
Below is a preinstallation Mac OS X shell script task that can be sampled in a test environment, however, I can not promise this will work as I have not tested it.  Others participants here can also test and provide community assistance if necessary.  Otherwise, my recommendation is to contact QUEST KACE Professional Services, as this is really their expertise.

#!/bin/bash

MAC=`/usr/sbin/networksetup -getmacaddress Ethernet 2> /dev/null | awk ' { print $3; }' | sed -e s/://g`
TEMP_PATH="/opt/kace/petemp/${MAC}"
IFS=$'\n'
volume=`mount | grep -m 1 disk0`
zeroMount=`echo "$volume" | awk  '{  print substr($0,index($0, "on ")+3,index($0, "(")-index($0, "on ")-4) }'`
# prefPath=${KACE_SYSTEM_DRIVE_PATH}/Library/Preferences/SystemConfiguration/preferences.plist
# tComputerName=`/usr/libexec/PlistBuddy -c "Print System:System:ComputerName" $prefPath`
# computerName=`echo $tComputerName | awk '{ print index($0,"Not Exist") }'`
# if [ x$computerName == x0 ]; then
#   computerName=$tComputerName
# else
#   computerName="localhost"
#fi
echo -n 'Computername: '
read computername

echo $computername
echo $computerName > "${TEMP_PATH}"

exit 0
This should prompt for a computername, then write the name out to a file.  The file output should be /opt/kace/petemp/${MAC}.  MAC being the MAC address of the client computer.  The apply Mac OS X computername (the normal script) should write that out to the plist.  That's it, hope this works or at least provides a good direction for you work with! 


Comments:
  • How To Contact QUEST KACE Professional Services (176023)
    https://support.quest.com/kb/176023 - WooLian 6 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ