mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-25 21:02:04 +00:00
Compare commits
10 Commits
046abf01f4
...
bf48fd61b5
| Author | SHA1 | Date | |
|---|---|---|---|
| bf48fd61b5 | |||
| b600dd763c | |||
| d5014fd7cf | |||
| 254b3df01d | |||
| 1c729e9be0 | |||
| 9575979867 | |||
| 51993c2d7e | |||
| b49633dde1 | |||
| ae6b006a4d | |||
| 48923d599f |
@ -313,7 +313,7 @@ reviewApplyChanges(){
|
|||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
e|edit)
|
e|edit)
|
||||||
${EDITOR} "${file}"
|
${EDITOR} "${file}.new"
|
||||||
;;
|
;;
|
||||||
s|skip)
|
s|skip)
|
||||||
echo "# file saved as: ${file}.new"
|
echo "# file saved as: ${file}.new"
|
||||||
@ -469,9 +469,9 @@ readCTVars(){
|
|||||||
}
|
}
|
||||||
readBridgeVars(){
|
readBridgeVars(){
|
||||||
# bridge config...
|
# bridge config...
|
||||||
|
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
|
||||||
xread "WAN bridge: vmbr" WAN_BRIDGE
|
xread "WAN bridge: vmbr" WAN_BRIDGE
|
||||||
xread "LAN bridge: vmbr" LAN_BRIDGE
|
xread "LAN bridge: vmbr" LAN_BRIDGE
|
||||||
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
|
|
||||||
}
|
}
|
||||||
readVars(){
|
readVars(){
|
||||||
xread -n "Email: " EMAIL
|
xread -n "Email: " EMAIL
|
||||||
|
|||||||
18
Makefile
18
Makefile
@ -60,6 +60,17 @@ check: check-message $(foreach dep,$(DEPENDENCIES),require($(dep)))
|
|||||||
FORCE:
|
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
|
%: config %/make.sh FORCE
|
||||||
$*/make.sh
|
$*/make.sh
|
||||||
|
|
||||||
@ -97,7 +108,12 @@ gate: gate-traefik
|
|||||||
# ...not yet sure of the best way to do this...
|
# ...not yet sure of the best way to do this...
|
||||||
#
|
#
|
||||||
.PHONY: bootstrap
|
.PHONY: bootstrap
|
||||||
bootstrap: host
|
bootstrap: host-bootstrap gate-bootstrap \
|
||||||
|
ns \
|
||||||
|
bootstrap-clean
|
||||||
|
|
||||||
|
.PHONY: bootstrap-clean
|
||||||
|
bootstrap-clean: host-bootstrap-clean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,13 @@
|
|||||||
#
|
#
|
||||||
# NOTE: on a clean Proxmox install ADMIN is pre-setup, we will use it
|
# NOTE: on a clean Proxmox install ADMIN is pre-setup, we will use it
|
||||||
# for bootstrapping and reconfigure it later.
|
# 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
|
ADMIN_BRIDGE=0
|
||||||
WAN_BRIDGE=
|
WAN_BRIDGE=3
|
||||||
LAN_BRIDGE=
|
LAN_BRIDGE=10
|
||||||
|
|
||||||
|
|
||||||
# NOTE: it is simpler to statically assign these than to configure dhcp
|
# NOTE: it is simpler to statically assign these than to configure dhcp
|
||||||
|
|||||||
11
host/make.sh
11
host/make.sh
@ -75,13 +75,18 @@ if xreadYes "# Create bridges?" BRIDGES ; then
|
|||||||
"vmbr\(${WAN_BRIDGE}\|${LAN_BRIDGE}\|${ADMIN_BRIDGE}\)" \
|
"vmbr\(${WAN_BRIDGE}\|${LAN_BRIDGE}\|${ADMIN_BRIDGE}\)" \
|
||||||
"$INTERFACES" ; then
|
"$INTERFACES" ; then
|
||||||
conflict=
|
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
|
if grep -q "vmbr${!br}" "$INTERFACES" ; then
|
||||||
conflict="${conflict}, vmbr${!br} (${br})"
|
conflict="${conflict}, vmbr${!br} (${br})"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "ERROR: will not overwrite existing bridges: ${conflict:2}" >&2
|
if grep -q "vmbr${ADMIN_BRIDGE}" "$INTERFACES" ; then
|
||||||
exit 1
|
echo "NOTE: reusing vmbr${ADMIN_BRIDGE} for ADMIN."
|
||||||
|
else
|
||||||
|
echo "ERROR: will not overwrite existing bridges: ${conflict:2}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ cp "$INTERFACES"{,.bak}
|
@ cp "$INTERFACES"{,.bak}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user