[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small modification to hobbitclient-linux.sh
- To: hobbit (at) hswn.dk
- Subject: Small modification to hobbitclient-linux.sh
- From: Frédéric Mangeant <frederic.mangeant (at) steria.com>
- Date: Fri, 02 Jun 2006 14:47:30 +0200
- User-agent: Thunderbird 1.5.0.4 (Windows/20060516)
Hi Henrik
hobbitclient-linux.sh uses "uname -a" to report information about the
OS, which gives something like this :
Linux hades 2.6.14.2 #2 Wed Nov 16 10:14:26 CET 2005 i686 Pentium III
(Katmai) GNU/Linux
IMHO it would be great to display less information about the running
kernel and add information about the Linux distribution, something like
that :
Linux 2.6.14.2 i686 - Gentoo Base System version 1.6.14
Linux 2.6.9-34.EL i686 - CentOS release 4.3 (Final)
Linux 2.4.20-28.7 i686 - Red Hat Linux release 7.3 (Valhalla)
Linux 2.4.26-vs1.28 i686 - Debian 3.1
Linux 2.4.18-64GB-SMP i686 - SuSE Linux 8.0 (i386)
If you like this idea, I've tested the attached "patch" (on top of
latest snapshot) with RedHat / CentOS, Gentoo, Debian and SuSE.
Regards,
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
--- hobbitclient-linux.sh.orig 2006-06-02 14:23:20.000000000 +0200
+++ hobbitclient-linux.sh 2006-06-02 14:44:13.000000000 +0200
@@ -14,7 +14,18 @@
echo "[date]"
date
echo "[uname]"
-uname -a
+uname -rsm
+echo "-"
+if [ -f /etc/redhat-release ]; then
+ cat /etc/redhat-release
+elif [ -f /etc/gentoo-release ]; then
+ cat /etc/gentoo-release
+elif [ -f /etc/debian_version ]; then
+ echo -en "Debian "
+ cat /etc/debian_version
+elif [ -f /etc/SuSE-release ]; then
+ grep ^SuSE /etc/SuSE-release
+fi
echo "[uptime]"
uptime
echo "[who]"