debina/rules mipsel cross-compiling
[svn/Prometheus-QoS/.git] / optional-tools / make-pimp
... / ...
CommitLineData
1#!/bin/bash
2pimp_2way_nat="/rw/var/run/pimp-2way-nat.tmp"
3pimp_snat="/rw/var/run/pimp-snat.tmp"
4etchosts="/rw/etc/hosts"
5
6echo -n "Writing $pimp_2way_nat"
7echo "#This file was generated by Prometheus-tools/make-pimp" > $pimp_2way_nat
8for czfip in `grep [[] $etchosts|cut -f 1`
9do
10 pubip=`grep "^$czfip " $etchosts|cut -f 2 -d "["|cut -f 1 -d "]"`
11 if ! [ -z $pubip ]
12 then
13 echo "$czfip $pubip" >> $pimp_2way_nat
14 echo -n .
15 fi
16done
17echo " done."
18
19echo -n "Writing $pimp_snat"
20echo "#This file was generated by Prometheus-tools/make-pimp" > $pimp_snat
21for czfip in `grep "(" $etchosts|cut -f 1`
22do
23 pubip=`grep "^$czfip " $etchosts|cut -f 2 -d "("|cut -f 1 -d ")"`
24 if ! [ -z $pubip ]
25 then
26 echo "$czfip $pubip" >> $pimp_snat
27 echo -n .
28 fi
29done
30echo " done."
This page took 0.079338 seconds and 4 git commands to generate.