/usr/bin/ltsp-cluster-info is in ldm 2:2.2.13-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #!/bin/sh
export TEXTDOMAIN=ltsp-cluster-info
if [ -f /usr/bin/gettext.sh ]; then
. /usr/bin/gettext.sh
else
eval_gettext() {
if [ $"test" = "\$test" ]; then
eval "echo $*"
else
echo $"$*"
fi
}
fi
if [ -z "$LDM_SERVER" ]; then
eval $(getltscfg -a -c /var/cache/getltscfg-cluster/lts.conf) || true
fi
if [ -z "$CLUSTER_CONFIGURED" ]; then
title=`eval_gettext "Information on this thin client."`
else
title=`eval_gettext "This thin client hasn't been configured yet."`
fi
test -f /etc/ltsp/getltscfg-cluster.conf && . /etc/ltsp/getltscfg-cluster.conf
INTERFACE=$(ip route | grep default | cut -d " " -f5)
INTERFACE_MAC=$(/sbin/ifconfig | grep ${INTERFACE} | cut -f11 -d" ")
INTERFACE_IP=$(/sbin/ifconfig ${INTERFACE} | grep inet | cut -f2 -d":" | cut -f1 -d" ")
CPU=$(cat /proc/cpuinfo | grep "^model name" | head -1 | sed "s/.*: //")
RAM=$(free -m | grep "^Mem" | awk '{print $2}')
VGA=$(lspci | grep "VGA" | sed "s/.* \[//" | sed "s/\]//")
APPSERVER=${LDM_SERVER:-$RDP_SERVER}
URL="http://$CC_SERVER/ltsp-cluster-control/Admin"
BROWSER=$(which firefox)
if [ -n "$BROWSER" ]; then
URL="<a href=\"$URL\">$URL</a>"
fi
output=$(ldm-dialog --message "<b>${title}</b>
<b>`eval_gettext "MAC address"`:</b> ${INTERFACE_MAC}
<b>`eval_gettext "IP address"`:</b> ${INTERFACE_IP}
<b>`eval_gettext "CPU"`:</b> ${CPU}
<b>`eval_gettext "RAM"`:</b> ${RAM}MB
<b>`eval_gettext "Video"`:</b> ${VGA}
<b>`eval_gettext "Application server"`:</b> ${APPSERVER}
<b>`eval_gettext "Web interface"`:</b> ${URL}
")
url=$(echo $output | grep "^url: " | sed "s/^url: //g")
if [ -n "$BROWSER" ] && [ -n "$url" ]; then
$BROWSER $url
fi
|