From 7b3d75702e404626e66e070db48cedc8abf16dd6 Mon Sep 17 00:00:00 2001 From: xchaos Date: Sun, 7 Sep 2008 15:35:13 +0000 Subject: [PATCH] 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 --- optional-tools/make-pimp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ] -- 2.30.2