From 2422de852d06ce8da302ae1ffea599b4d745a924 Mon Sep 17 00:00:00 2001
From: David Schmitz <schmitz@lrz.de>
Date: Thu, 21 Dec 2023 09:20:36 +0000
Subject: [PATCH] exabgp remote support: ./install-debian.sh

---
 install-debian.sh | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/install-debian.sh b/install-debian.sh
index 10b16110..3bb580b7 100755
--- a/install-debian.sh
+++ b/install-debian.sh
@@ -116,7 +116,19 @@ setup_netconf__pass="netconf"
 
 #
 
-setup_exabgp=0
+
+if [ "$FOD_PROXY_CLASS" = "proxy_exabgp" ]; then
+  setup_exabgp=1
+elif [ "$FOD_PROXY_CLASS" = "proxy_exabgp_remote" ]; then
+  setup_exabgp=2
+else
+  setup_exabgp=0
+fi
+
+echo "$0: FOD_PROXY_CLASS=$FOD_PROXY_CLASS => initial setup_exabgp=$setup_exabgp" 1>&2
+
+#
+
 setup_exabgp_full=0
 
 setup_exabgp__nodeid=1.1.1.1
@@ -458,6 +470,10 @@ while [ $# -gt 0 ]; do
     setup_exabgp=1
     shift 1
     setup_exabgp_full=0
+  elif [ $# -ge 1 -a "$1" = "--exabgp_remote" ]; then 
+    shift 1
+    setup_exabgp=2
+    shift 1
   elif [ $# -ge 1 -a "$1" = "--exabgp" ]; then # currently 6 params follow
     shift 1
     setup_exabgp=1
@@ -1072,6 +1088,10 @@ EOF
     echo "$0: setting up exabgp fod conf" 1>&2
 
     echo -e '\n#added by install-*.sh:\nPROXY_CLASS="proxy_exabgp"' >> flowspy/settings_local.py
+  elif [ "$setup_exabgp" = 2 ]; then
+    echo "$0: setting up exabgp remote fod conf" 1>&2
+
+    echo -e '\n#added by install-*.sh:\nPROXY_CLASS="proxy_exabgp_remote"' >> flowspy/settings_local.py
   fi
 
   ##
-- 
GitLab