Die hier beschriebene Funktion liest die Einstellungen des Power Managements aus.

SECTION16 ()
{
echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Sleep computer when power button pressed" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "powerbutton" | wc -l) == "1" ]]; then
pmset -g | grep "powerbutton" | tee -a ${SUMMARY_FILE}
else
echo "entry powerbutton is not present" | tee -a ${SUMMARY_FILE}
fi
###

echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Disable computer sleep" | tee -a ${SUMMARY_FILE}
echo "\t reading settings for - Hard disk sleep idle time" | tee -a ${SUMMARY_FILE}
echo "\t reading settings for - Display sleep idle time" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "sleep" | wc -l) != "0" ]]; then
pmset -g | grep "sleep" | tee -a ${SUMMARY_FILE}
else
echo "entry sleep is not present" | tee -a ${SUMMARY_FILE}
fi
pmset -g | grep "sleep" | tee -a ${SUMMARY_FILE}
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Prevent idle sleep if remote login session is active" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "ttyskeepawake" | wc -l) == "1" ]]; then
pmset -g | grep "ttyskeepawake" | tee -a ${SUMMARY_FILE}
else
echo "entry ttyskeepawake is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Disable wake for network access" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "womp" | wc -l) == "1" ]]; then
pmset -g | grep "womp" | tee -a ${SUMMARY_FILE}
else
echo "entry womp is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Disable hibernate" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "hibernatemode" | wc -l) == "1" ]]; then
pmset -g | grep "hibernatemode" | tee -a ${SUMMARY_FILE}
else
echo "entry hibernatemode is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Dim display when switched to battery" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "lessbright" | wc -l) == "1" ]]; then
pmset -g | grep "lessbright" | tee -a ${SUMMARY_FILE}
else
echo "entry lessbright is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Wake when power source changes" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "acwake" | wc -l) == "1" ]]; then
pmset -g | grep "acwake" | tee -a ${SUMMARY_FILE}
else
echo "entry acwake is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - No auto restart after power failure" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "autorestart" | wc -l) == "1" ]]; then
pmset -g | grep "autorestart" | tee -a ${SUMMARY_FILE}
else
echo "entry autorestart is not present" | tee -a ${SUMMARY_FILE}
fi

###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Enable dimming before display sleep" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "halfdim" | wc -l) == "1" ]]; then
pmset -g | grep "halfdim" | tee -a ${SUMMARY_FILE}
else
echo "entry halfdim is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Wake when lid opened" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "lidwake" | wc -l) == "1" ]]; then
pmset -g | grep "lidwake" | tee -a ${SUMMARY_FILE}
else
echo "entry lidwake is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t reading settings for - Park disk heads on sudden motion" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "sms" | wc -l) == "1" ]]; then
pmset -g | grep "sms" | tee -a ${SUMMARY_FILE}
else
echo "entry sms is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t Display scheduled startup/wake and shutdown/sleep events" | tee -a ${SUMMARY_FILE}
if [[ $(pmset -g | grep "sched" | wc -l) == "1" ]]; then
pmset -g | grep "sched" | tee -a ${SUMMARY_FILE}
else
echo "entry sched is not present" | tee -a ${SUMMARY_FILE}
fi
###


echo "\n" >>${SUMMARY_FILE}
echo "\t Display macOS start sound settings" | tee -a ${SUMMARY_FILE}
if [[ $(nvram -p | grep "SystemAudioVolume" | wc -l) != "0" ]]; then
nvram -p | grep "SystemAudioVolume" | tee -a ${SUMMARY_FILE}
else
echo "entry sched is not present" | tee -a ${SUMMARY_FILE}
fi

}
###

##
# section 16
##
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.371 Konfiguration von Mac OS X Clients" | tee -a ${SUMMARY_FILE}
echo " J.16. Power Management" | tee -a ${SUMMARY_FILE}
SECTION16

Zum Seitenanfang