#!/bin/bash
#
status=1
mac=""
ifconfig en0 | grep -F "10." | grep -F "255"
if [ $? = 0 ]; then
status=0
mac=$(ifconfig en0 | grep ether | grep ..:..:..:..:..:.. | awk '{print $NF}')
echo "我的mac为 ${mac}" > "${HOME}/Desktop/mac.txt"
else
ifconfig en1 | grep -F "10." | grep -F "255"
if [ $? = 0 ]; then
status=0
mac=$(ifconfig en1 | grep ether | grep ..:..:..:..:..:.. | awk '{print $NF}')
echo "我的mac为 ${mac}" > "${HOME}/Desktop/mac.txt"
fi
fi
if [ $status = 0 ] && [ $mac != "" ]; then
fi
#open "${HOME}/Desktop/enrollmentProfile.mobileconfig" #这个也用不着
(/usr/bin/osascript -e 'display dialog "己卸载ksjamf描述文件,会自动打开s描述文件官网enroll后台,按常规操作安装s描述文件,安装后重启,然后请到js的 self service 中 双击更新ks组到jsjamf 同步s的jamf组到s!" buttons {"OK"} default button "OK" ')
sudo jamf removeframework