-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script to patch source to only bootstrap from ipv6 nodes
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /bin/bash | ||
|
||
patch_file="src/main/java/com/zoffcc/applications/sorm/BootstrapNodeEntryDB.java" | ||
|
||
ips=$(cat src/main/java/com/zoffcc/applications/sorm/BootstrapNodeEntryDB.java |grep BootstrapNodeEntryDB_|\ | ||
grep -v '"[a-z]' |grep -v ':'|sed -e 's#^.*num_, "##g'|grep -v 'boolean udp_node_,'|awk '{print $1}'|\ | ||
sed -e 's#".*$##'|sort|uniq |sort) | ||
|
||
hostnames=$(cat src/main/java/com/zoffcc/applications/sorm/BootstrapNodeEntryDB.java |grep BootstrapNodeEntryDB_|\ | ||
grep '"[a-z]'|sed -e 's#^.*num_, "##g'|grep -v 'boolean udp_node_,'|awk '{print $1}'|\ | ||
sed -e 's#".*$##'|sort|uniq |sort) | ||
|
||
for i in $(echo $ips) ; do | ||
cat "$patch_file" | grep -v "$i" > a.txt | ||
cp a.txt "$patch_file" | ||
rm -f a.txt | ||
done | ||
|
||
for i in $(echo $hostnames) ; do | ||
cat "$patch_file" | grep -v "$i" > a.txt | ||
cp a.txt "$patch_file" | ||
rm -f a.txt | ||
done | ||
|