[Fai-commit] r3748 - trunk/conf

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Wed Aug 2 15:47:40 UTC 2006


Author: lange
Date: 2006-08-02 15:47:28 +0000 (Wed, 02 Aug 2006)
New Revision: 3748

Modified:
   trunk/conf/make-fai-nfsroot.conf
Log:
use perl for getting IP address


Modified: trunk/conf/make-fai-nfsroot.conf
===================================================================
--- trunk/conf/make-fai-nfsroot.conf	2006-08-02 14:43:58 UTC (rev 3747)
+++ trunk/conf/make-fai-nfsroot.conf	2006-08-02 15:47:28 UTC (rev 3748)
@@ -23,7 +23,7 @@
 
 # export $NFSROOT to this netgroup or this range of IP addresses
 # (eg. FAICLIENTS="192.168.1.0/24")
-FAICLIENTS=`ifconfig ${SERVERINTERFACE} | grep -w inet | cut -d : -f 2 | cut -d ' ' -f 1 | sed -e 's/\(.*\)\.[0-9]*/\1.0\/24/' | tr -d ' '`
+FAICLIENTS=`ifconfig ${SERVERINTERFACE} | perl -ne '/ addr:([\d\.]+)/ && print "$1\n"' | sed -e 's/\(.*\)\.[0-9]*/\1.0\/24/' | tr -d ' '`
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 # following lines should be read only for most of you
 




More information about the Fai-commit mailing list