optional-tools/make-pimp modified to ignored comments in hosts file
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 7 Sep 2008 15:35:13 +0000 (15:35 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 7 Sep 2008 15:35:13 +0000 (15:35 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@97 251d49ef-1d17-4917-a970-b30cf55b089b

optional-tools/make-pimp

index 6a1d69aaa2a7c98716efd37292a3fb5799ca44c5..2c0f59d21528dedb54fee1bceff2f63279fcd4cc 100755 (executable)
@@ -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
 
 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 ] 
 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
 
 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 ] 
 do
  pubip=`grep "^$czfip  " $etchosts|cut -f 2 -d "("|cut -f 1 -d ")"`
  if ! [ -z $pubip ] 
This page took 0.159589 seconds and 4 git commands to generate.