From: xchaos Date: Sun, 7 Sep 2008 15:35:13 +0000 (+0000) Subject: optional-tools/make-pimp modified to ignored comments in hosts file X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=7b3d75702e404626e66e070db48cedc8abf16dd6;p=svn%2FPrometheus-QoS%2F.git optional-tools/make-pimp modified to ignored comments in hosts file git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@97 251d49ef-1d17-4917-a970-b30cf55b089b --- diff --git a/optional-tools/make-pimp b/optional-tools/make-pimp index 6a1d69a..2c0f59d 100755 --- a/optional-tools/make-pimp +++ b/optional-tools/make-pimp @@ -5,7 +5,7 @@ etchosts="/rw/etc/hosts" echo -n "Writing $pimp_2way_nat" echo "#This file was generated by Prometheus-tools/make-pimp" > $pimp_2way_nat -for czfip in `grep [[] $etchosts|cut -f 1` +for czfip in `grep -v ^# $etchosts|grep [[]|cut -f 1` do pubip=`grep "^$czfip " $etchosts|cut -f 2 -d "["|cut -f 1 -d "]"` if ! [ -z $pubip ] @@ -18,7 +18,7 @@ echo " done." echo -n "Writing $pimp_snat" echo "#This file was generated by Prometheus-tools/make-pimp" > $pimp_snat -for czfip in `grep "(" $etchosts|cut -f 1` +for czfip in `grep -v ^# $etchosts|grep "("|cut -f 1` do pubip=`grep "^$czfip " $etchosts|cut -f 2 -d "("|cut -f 1 -d ")"` if ! [ -z $pubip ]