mirror of https://codeberg.org/CRXN/entitydb.git
Extend maxlen script by YAML building function
This commit is contained in:
parent
9a5e42bee5
commit
4465f7ed22
|
@ -12,6 +12,7 @@ if [ ! "$1" ]; then
|
|||
echo "babeld - [with-deny]"
|
||||
echo "babeld-uci - [with-deny]"
|
||||
echo "bird - [prefix-list]"
|
||||
echo "yaml"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -41,6 +42,8 @@ for file in *.json; do
|
|||
if [ "$2" == "with-deny" ]; then
|
||||
filter="${filter}config filter\n\toption 'type'\t'in'\n\toption 'ip'\t'$prefix'\n\toption 'action'\t'deny'\n\n"
|
||||
fi
|
||||
elif [ "$1" == "yaml" ]; then
|
||||
filter="${filter}- prefix: $prefix\n maxlen: $maxlen\n"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@ -52,7 +55,7 @@ elif [ "$1" == "babeld-uci" ]; then
|
|||
filter=${filter::-4}
|
||||
elif [ "$1" == "bird" ]; then
|
||||
filter=${filter::-3}
|
||||
elif [ "$1" == "babeld" ]; then
|
||||
elif [ "$1" == "babeld" ] || [ "$1" == "yaml" ]; then
|
||||
filter=${filter::-2}
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue