Mit folgender Funktion kann die Konfiguration der Schnittstellen vom WLAN, Bluetooth, Thunderbolt, Firewire ausgelesen werden.

SUMMARY_FILE=${HW_UUID}_${DATE}.txt

KEXT_WLAN ()
{
local kext_path=/System/Library/Extensions/
local file1_no_ext=IO80211Family
local file1=${file1_no_ext}.kext
local file1_loaded=kextstat | grep $file1_no_ext | wc -l
local friendly_name="Wi-Fi kext files"
local file1_exists=0

if [ -e "$kext_path${file1}" ]; then file1_exists=1; fi

if [ $file1_exists == "1" ]; then
echo "${file1} is present in $kext_path" | tee -a ${SUMMARY_FILE}
else
echo "${file1} is not present in $kext_path" | tee -a ${SUMMARY_FILE}
fi

if [ $file1_loaded == "1" ]; then
echo "${file1} is loaded" | tee -a ${SUMMARY_FILE}
else
echo "${file1} is not loaded" | tee -a ${SUMMARY_FILE}
fi

if [ $file1_exists == "1" ]; then
echo "$friendly_name are present" | tee -a ${SUMMARY_FILE}
else
echo "$friendly_name are not present" | tee -a ${SUMMARY_FILE}
fi
}

###

KEXT_BLUETOOTH ()
{
local kext_path=/System/Library/Extensions/
local file1_no_ext=IOBluetoothFamily
local file1=$file1_no_ext.kext
local file1_loaded=`kextstat | grep $file1_no_ext | wc -l`
local file1_exists=0
local file2_no_ext=IOBluetoothHIDDriver
local file2=$file2_no_ext.kext
local file2_loaded=`kextstat | grep ${file2}_no_ext | wc -l`
local file2_exists=0

if [ -e "${kext_path}${file1}" ]; then file1_exists=1; fi
if [ -e "${kext_path}${file2}" ]; then file2_exists=1; fi


if [ $file1_exists == "1" ]; then
echo "${file1} is present in $kext_path" | tee -a ${SUMMARY_FILE}
else
echo "${file1} is not present in $kext_path" | tee -a ${SUMMARY_FILE}
fi

if [ $file2_exists == "1" ]; then
echo "${file2} is present in $kext_path" | tee -a ${SUMMARY_FILE}
else
echo "${file2} is not present in $kext_path" | tee -a ${SUMMARY_FILE}
fi

if [ $file1_exists == "1" ] || [ $file2_exists == "1" ]; then
echo "Bluetooth kext file(s) present" | tee -a ${SUMMARY_FILE}
else
echo "Bluetooth kext files not present" | tee -a ${SUMMARY_FILE}
fi

}

###

SECTION1 ()
{
echo "\n" >>${SUMMARY_FILE}
echo "\t reading Bluetooth settings" | tee -a ${SUMMARY_FILE}
local SRV=`networksetup -listallnetworkservices | grep "Bluetooth PAN" | wc -l`

if [ ${SRV} == "1" ]; then
networksetup -getinfo "Bluetooth PAN" | tee -a ${SUMMARY_FILE}
system_profiler SPBluetoothDataType | grep "Connectable" | tee -a ${SUMMARY_FILE}
${def_cr}com.apple.Bluetooth.plist | grep "ControllerPowerState" | tee -a ${SUMMARY_FILE}
else
echo "Bluetooth PAN is not present" | tee -a ${SUMMARY_FILE}
fi

KEXT_BLUETOOTH

#
echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - WLAN and neighbors" | tee -a ${SUMMARY_FILE}
local SRV=`networksetup -listallnetworkservices | grep "Wi-Fi" | wc -l`

if [ ${SRV} == "1" ]; then
networksetup -getinfo "Wi-Fi" | tee -a ${SUMMARY_FILE}
defaults read /Library/Preferences/com.apple.airport.opproam.plist | tee -a ${SUMMARY_FILE}
system_profiler SPAirPortDataType | tee -a ${SUMMARY_FILE}
else
echo "Wi-Fi is not present" | tee -a ${SUMMARY_FILE}
fi
KEXT_WLAN

echo "\n" >>${SUMMARY_FILE}
echo "\t reading Infrared (IR) settings" | tee -a ${SUMMARY_FILE}
defaults read /Library/Preferences/com.apple.driver.AppleIRController.plist | grep "DeviceEnabled" | tee -a ${SUMMARY_FILE}
KEXT_IR

echo "\n" >>${SUMMARY_FILE}
echo "\t reading Built-in camera settings" | tee -a ${SUMMARY_FILE}
KEXT_ISIGHT

echo "\n" >>${SUMMARY_FILE}
echo "\t reading FibreChannel settings" | tee -a ${SUMMARY_FILE}
local SRV=`networksetup -listallnetworkservices | grep "FibreChannel" | wc -l`

if [ ${SRV} == "1" ]; then
networksetup -getinfo "FibreChannel" | tee -a ${SUMMARY_FILE}
system_profiler SPFibreChannelDataType | tee -a ${SUMMARY_FILE}
else
echo "FibreChannel is not present" | tee -a ${SUMMARY_FILE}
fi

echo "\n" >>${SUMMARY_FILE}
echo "\t reading Ethernet settings" | tee -a ${SUMMARY_FILE}
local SRV=`networksetup -listallnetworkservices | grep "Ethernet" | wc -l`
if [ ${SRV} == "1" ]; then
networksetup -getinfo "Ethernet" | tee -a ${SUMMARY_FILE}
system_profiler SPEthernetDataType | tee -a ${SUMMARY_FILE}
else
echo "Ethernet is not present" | tee -a ${SUMMARY_FILE}
fi

echo "\n" >>${SUMMARY_FILE}
echo "\t reading Firewire settings" | tee -a ${SUMMARY_FILE}
local SRV=`networksetup -listallnetworkservices | grep "FireWire" | wc -l`
if [ ${SRV} == "1" ]; then
networksetup -getinfo "FireWire" | tee -a ${SUMMARY_FILE}
system_profiler SPFireWireDataType | tee -a ${SUMMARY_FILE}
else
echo "FireWire is not present" | tee -a ${SUMMARY_FILE}
fi


echo "\n" >>${SUMMARY_FILE}
echo "\t reading Thunderbolt settings" | tee -a ${SUMMARY_FILE}
SETTING_THUNDERBOLT
}

###

##
# section 1
##
GEN_SUMMARY_SEPARATOR
echo " M 2.478 Planung des sicheren Einsatzes von Mac OS X" | tee -a ${SUMMARY_FILE}
echo " M 2.479 Planung der Sicherheitsrichtlinien von Mac OS X" | tee -a ${SUMMARY_FILE}
echo " M 4.373 Deaktivierung nicht benötigter Hardware unter Mac OS X" | tee -a ${SUMMARY_FILE}
echo " M 4.371 Konfiguration von Mac OS X Clients" | tee -a ${SUMMARY_FILE}
echo " J.1. Disabling Hardware Components" | tee -a ${SUMMARY_FILE}
SECTION1

Zum Seitenanfang