Compare commits

..

10 Commits

Author SHA1 Message Date
bf48fd61b5 notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 15:53:57 +03:00
b600dd763c ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 14:43:50 +03:00
d5014fd7cf ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 14:42:04 +03:00
254b3df01d ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 14:38:01 +03:00
1c729e9be0 adding bootstrap...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 14:25:02 +03:00
9575979867 fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 13:02:06 +03:00
51993c2d7e fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 13:01:07 +03:00
b49633dde1 fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 12:49:48 +03:00
ae6b006a4d ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 12:41:37 +03:00
48923d599f removed admin bridge check...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-10-17 12:38:40 +03:00
4 changed files with 33 additions and 9 deletions

View File

@ -313,7 +313,7 @@ reviewApplyChanges(){
break
;;
e|edit)
${EDITOR} "${file}"
${EDITOR} "${file}.new"
;;
s|skip)
echo "# file saved as: ${file}.new"
@ -469,9 +469,9 @@ readCTVars(){
}
readBridgeVars(){
# bridge config...
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
xread "WAN bridge: vmbr" WAN_BRIDGE
xread "LAN bridge: vmbr" LAN_BRIDGE
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
}
readVars(){
xread -n "Email: " EMAIL

View File

@ -60,6 +60,17 @@ check: check-message $(foreach dep,$(DEPENDENCIES),require($(dep)))
FORCE:
# XXX should thisbe an env var or an arg to make.sh???
%-bootstrap: export BOOTSTRAP=1
%-bootstrap: %
true
%-bootstrap-clean: export BOOTSTRAP_CLEAN=1
%-bootstrap-clean: %
true
%: config %/make.sh FORCE
$*/make.sh
@ -97,7 +108,12 @@ gate: gate-traefik
# ...not yet sure of the best way to do this...
#
.PHONY: bootstrap
bootstrap: host
bootstrap: host-bootstrap gate-bootstrap \
ns \
bootstrap-clean
.PHONY: bootstrap-clean
bootstrap-clean: host-bootstrap-clean

View File

@ -30,10 +30,13 @@
#
# NOTE: on a clean Proxmox install ADMIN is pre-setup, we will use it
# for bootstrapping and reconfigure it later.
# NOTE: to make things simpler it is recommmended to number bridges
# connecting to physical ports the same as ports and virtual
# bridges with numbers greater than X (10 in the example below)
#
ADMIN_BRIDGE=vmbr0
WAN_BRIDGE=
LAN_BRIDGE=
ADMIN_BRIDGE=0
WAN_BRIDGE=3
LAN_BRIDGE=10
# NOTE: it is simpler to statically assign these than to configure dhcp

View File

@ -75,14 +75,19 @@ if xreadYes "# Create bridges?" BRIDGES ; then
"vmbr\(${WAN_BRIDGE}\|${LAN_BRIDGE}\|${ADMIN_BRIDGE}\)" \
"$INTERFACES" ; then
conflict=
for br in WAN_BRIDGE LAN_BRIDGE ADMIN_BRIDGE ; do
#for br in WAN_BRIDGE LAN_BRIDGE ADMIN_BRIDGE ; do
for br in WAN_BRIDGE LAN_BRIDGE ; do
if grep -q "vmbr${!br}" "$INTERFACES" ; then
conflict="${conflict}, vmbr${!br} (${br})"
fi
done
if grep -q "vmbr${ADMIN_BRIDGE}" "$INTERFACES" ; then
echo "NOTE: reusing vmbr${ADMIN_BRIDGE} for ADMIN."
else
echo "ERROR: will not overwrite existing bridges: ${conflict:2}" >&2
exit 1
fi
fi
@ cp "$INTERFACES"{,.bak}
@ cp "$INTERFACES"{,.new}