From 69b5ac30b98dfe38f56d7025ad8808281c68fd16 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 19 Oct 2024 18:40:53 +0300 Subject: [PATCH] added interfaces final... Signed-off-by: Alex A. Naanou --- host/make.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/host/make.sh b/host/make.sh index 03a11f5..256a520 100755 --- a/host/make.sh +++ b/host/make.sh @@ -143,12 +143,18 @@ if xreadYes "# Create bridges?" BRIDGES ; then if [ -z "$DRY_RUN" ] ; then # write both bootstrap and clean bridge configurations... if ! [ -z $BRIDGES_BOOTSTRAP ] ; then + + # interfaces.final + @ cp "$INTERFACES"{.new,.final} + @ sed -i \ + -e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \ + -e 's/^.*gateway .*$//' \ + "$INTERFACES".final + echo "$BRIDGES" \ + >> "$INTERFACES".final + + # interfaces.clean @ cp "$INTERFACES"{.new,.clean} - # XXX disconnect bootstrap and connnect admin... - # ...make this optional... - #@ sed -i \ - # -e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \ - # "$INTERFACES".clean @ sed -i \ -e 's/^.*gateway .*\n//' \ "$INTERFACES".clean @@ -156,17 +162,21 @@ if xreadYes "# Create bridges?" BRIDGES ; then | sed \ -e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \ >> "$INTERFACES".clean + + # interfaces.new (prep) BRIDGES=$(\ echo "$BRIDGES_BOOTSTRAP" \ | sed -e 's/^.*gateway .*$//') fi + # interfaces.new echo "$BRIDGES" >> "$INTERFACES".new else echo "$BRIDGES" fi + # interfaces if reviewApplyChanges "$INTERFACES" ; then # XXX this must be done in nohup to avoid breaking on connection lost... if ! @ ifreload -a ; then