Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
lcd management dell r730
#!/bin/bash
# put the system hostname in the service display without dell OEM tools etc.
# found via
# https://pcloadletter.co.uk/2010/06/14/set-custom-lcd-panel-text-on-poweredge-r710-servers/
syntax() {
echo "
$0 - automatically set hostname on Dell server's status display
USAGE:
$0 (get|set)
"
exit 1
}
isdellserver() {
type dmidecode 2>&1>/dev/null && type ipmitool 2>&1>/dev/null &&
SYSINFO=$( dmidecode | grep -A4 "System Information" ) &&
[[ $SYSINFO =~ Dell ]] &&
[[ $SYSINFO =~ PowerEdge ]] &&
return $?
}
access_lcd() {
case $1 in
get)
ipmitool delloem lcd info ;;
set)
ipmitool delloem lcd set mode userdefined "$( uname -n )" ;;
*)
syntax ;;
esac
}
main() {
if isdellserver ; then
access_lcd "$1"
fi
}
[ $# != 1 ] && syntax
main "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.