[Fai-commit] r3750 - trunk/conf

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Wed Aug 2 22:05:59 UTC 2006


Author: lange
Date: 2006-08-02 22:05:58 +0000 (Wed, 02 Aug 2006)
New Revision: 3750

Modified:
   trunk/conf/make-fai-nfsroot.conf
Log:
optimize perl regex. Oh, I love Perl!


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




More information about the Fai-commit mailing list