[26064] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25371 - trunk/debathena/scripts/installer

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Aug 10 20:39:44 2011

Date: Wed, 10 Aug 2011 20:39:37 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201108110039.p7B0dbRE009958@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-08-10 20:39:37 -0400 (Wed, 10 Aug 2011)
New Revision: 25371

Modified:
   trunk/debathena/scripts/installer/install-debathena.beta.sh
Log:
Attmpet to detect laptops (Trac: #613)

Modified: trunk/debathena/scripts/installer/install-debathena.beta.sh
===================================================================
--- trunk/debathena/scripts/installer/install-debathena.beta.sh	2011-08-10 22:54:05 UTC (rev 25370)
+++ trunk/debathena/scripts/installer/install-debathena.beta.sh	2011-08-11 00:39:37 UTC (rev 25371)
@@ -74,6 +74,16 @@
     ;;
 esac
 
+laptop=no
+wifi=no
+if [ -x /usr/sbin/laptop-detect ] && /usr/sbin/laptop-detect 2>/dev/null; then
+    laptop=yes
+fi
+
+if [ -x /usr/bin/nmcli ] && /usr/bin/nmcli dev status 2>/dev/null | awk '{print $2}' | grep -q 802-11-wireless; then
+    wifi=yes
+fi
+
 echo "Welcome to the Debathena installer."
 echo ""
 echo "Please choose the category which best suits your needs.  Each category"
@@ -90,6 +100,14 @@
 echo "                   Recommended for auto-managed cluster-like systems."
 echo ""
 
+if [ "$laptop" = "yes" ] || [ "$wifi" = "yes" ]; then
+    cat <<EOF 
+This machine appears to be a laptop or has at least one wireless
+network device.  You probably want to choose "standard" unless this
+device will have an uninterrupted network connection.
+EOF
+fi
+
 category=""
 if test -f /root/pxe-install-flag ; then
   pxetype=`head -1 /root/pxe-install-flag`


home help back first fref pref prev next nref lref last post