[Fai-commit] r5430 - in trunk: bin lib

Thomas Lange lange at alioth.debian.org
Sat Jul 18 16:34:30 UTC 2009


Author: lange
Date: 2009-07-18 16:34:28 +0000 (Sat, 18 Jul 2009)
New Revision: 5430

Modified:
   trunk/bin/fai-setup
   trunk/bin/make-fai-nfsroot
   trunk/lib/subroutines-linux
   trunk/lib/task_sysinfo
Log:
show only network interfaces which are running, add statistics to one ip call 


Modified: trunk/bin/fai-setup
===================================================================
--- trunk/bin/fai-setup	2009-07-18 16:29:12 UTC (rev 5429)
+++ trunk/bin/fai-setup	2009-07-18 16:34:28 UTC (rev 5430)
@@ -115,7 +115,7 @@
 	    [ -f /etc/ssh/ssh_host_dsa_key.pub ] && DSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_dsa_key.pub)
 	    [ -f /etc/ssh/ssh_host_rsa_key.pub ] && RSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_rsa_key.pub )
 	    # determine all IP addresses, and their host names
-	    ips=$(ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | grep -v 127.0.0.1)
+	    ips=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | grep -v 127.0.0.1)
 	    for ip in $ips; do
 		hname=$(getent hosts $ip| tr -s ' ' ',')
 		[ -z "$hname" ] && hname=$ip

Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot	2009-07-18 16:29:12 UTC (rev 5429)
+++ trunk/bin/make-fai-nfsroot	2009-07-18 16:34:28 UTC (rev 5430)
@@ -262,7 +262,7 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 add_all_host_entries() {
 
-    local ips=$(ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1)
+    local ips=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1)
     for eth in $ips; do
 	getent hosts $eth >> etc/hosts || true
     done

Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux	2009-07-18 16:29:12 UTC (rev 5429)
+++ trunk/lib/subroutines-linux	2009-07-18 16:34:28 UTC (rev 5430)
@@ -271,7 +271,7 @@
 
     if [ $do_init_tasks -eq 1 ] ; then
 	# show some local information
-	ip addr; df
+	ip -s link show up; df
 	# umount swap space
 	swapoff -a
     fi

Modified: trunk/lib/task_sysinfo
===================================================================
--- trunk/lib/task_sysinfo	2009-07-18 16:29:12 UTC (rev 5429)
+++ trunk/lib/task_sysinfo	2009-07-18 16:34:28 UTC (rev 5430)
@@ -26,7 +26,7 @@
 lsusb
 echo "Ethernet cards found: $netdevices_all"
 echo "Ethernet cards running: $netdevices_up"
-ip addr
+ip addr show up
 
 [ -x "$(which sysinfo)" ] && sysinfo -class device -level all
 




More information about the Fai-commit mailing list