summaryrefslogtreecommitdiff
path: root/contrib/scripts/netjail/netjail_core.sh
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2021-07-01 20:37:51 +0200
committerTheJackiMonster <thejackimonster@gmail.com>2021-07-01 20:37:51 +0200
commite8db1a67cdd270d655e677ffff52f72d5fe4000b (patch)
tree1d76393653187b07dab5ed6ef4d6ff606a4e5ac8 /contrib/scripts/netjail/netjail_core.sh
parentb6252033387779338051eb617f2594a0b3c851bc (diff)
-added global nodes without NAT to netjail
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'contrib/scripts/netjail/netjail_core.sh')
-rwxr-xr-xcontrib/scripts/netjail/netjail_core.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/scripts/netjail/netjail_core.sh b/contrib/scripts/netjail/netjail_core.sh
index 1cdbca816..d070f7220 100755
--- a/contrib/scripts/netjail/netjail_core.sh
+++ b/contrib/scripts/netjail/netjail_core.sh
@@ -28,6 +28,23 @@ netjail_opt() {
printf "%d" 0
}
+netjail_opts() {
+ local OPT=$1
+ local DEF=$2
+ shift 2
+
+ while [ $# -gt 0 ]; do
+ if [ "$1" = "$OPT" ]; then
+ printf "$2"
+ return
+ fi
+
+ shift 1
+ done
+
+ printf "$DEF"
+}
+
netjail_check() {
local NODE_COUNT=$1
local FD_COUNT=$(($(ls /proc/self/fd | wc -w) - 4))