Changeset 7298 in genesis
- Timestamp:
- Dec 2, 2009, 7:54:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/dubbelipcheck.sh
r7297 r7298 8 8 genesis_nodes_dir="`dirname $0`" 9 9 allowed_dubbel_ip="172.31.255.1 172.31.255.2" 10 tmp_files="all_ips all_ips_no_double" 10 TMPDIR=`mktemp -d -t $(basename $0 .sh).XXXXX` 11 11 12 12 ERRNO=0 … … 21 21 link_ips=`cat $files | grep ^IP | grep -v '$master_ip' |\ 22 22 sed -e 's/IP=//' -e 's/\/[0-9]*//'` 23 echo "$master_ips $link_ips" | sort > all_ips24 echo "$master_ips $link_ips" | sort -u > all_ips_no_double23 echo "$master_ips $link_ips" | sort > $TMPDIR/all_ips 24 echo "$master_ips $link_ips" | sort -u > $TMPDIR/all_ips_no_double 25 25 } 26 26 … … 28 28 #check up dubbele ip addressen 29 29 dubbelIpCheck() { 30 dubbel_ips=`comm -23 all_ipsall_ips_no_double | sort -u`30 dubbel_ips=`comm -23 $TMPDIR/all_ips $TMPDIR/all_ips_no_double | sort -u` 31 31 } 32 32 … … 65 65 #verwijder tijdelijke files 66 66 cleanup() { 67 for file in $tmp_files ; do 68 rm $file 69 done 67 rm -R $TMPDIR 70 68 } 71 69
Note:
See TracChangeset
for help on using the changeset viewer.