mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 18:50:08 +00:00
tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1f01f637bc
commit
8b8822d944
@ -18,6 +18,15 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Bootsrap configuration...
|
||||||
|
#
|
||||||
|
# Usually this is the default bridge created in Proxmox, so there is no
|
||||||
|
# need to touch this.
|
||||||
|
BOOTSTRAP_BRIDGE=0
|
||||||
|
# XXX
|
||||||
|
#BOOTSTRAP_PORT=none
|
||||||
|
|
||||||
|
|
||||||
# CT interface bridge configuration.
|
# CT interface bridge configuration.
|
||||||
#
|
#
|
||||||
# These are set to the bridge number (the number in 'vmbr#') used for
|
# These are set to the bridge number (the number in 'vmbr#') used for
|
||||||
@ -34,10 +43,10 @@
|
|||||||
# ADMIN_BRIDGE=3
|
# ADMIN_BRIDGE=3
|
||||||
# LAN_BRIDGE=10
|
# LAN_BRIDGE=10
|
||||||
#
|
#
|
||||||
BOOTSTRAP_BRIDGE=0
|
# XXX revise numbering...
|
||||||
ADMIN_BRIDGE=00
|
ADMIN_BRIDGE=_admin
|
||||||
WAN_BRIDGE=03
|
WAN_BRIDGE=_wan
|
||||||
LAN_BRIDGE=10
|
LAN_BRIDGE=_lan
|
||||||
|
|
||||||
|
|
||||||
# NOTE: it is simpler to statically assign these than to configure dhcp
|
# NOTE: it is simpler to statically assign these than to configure dhcp
|
||||||
|
|||||||
@ -42,14 +42,15 @@ REBOOT=${REBOOT:=1}
|
|||||||
# Bootstrap cleanup...
|
# Bootstrap cleanup...
|
||||||
|
|
||||||
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
|
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
|
||||||
ID=${GATE_ID:=${DFL_ID}}
|
#ID=${ID:-${DFL_ID}}
|
||||||
|
|
||||||
xread "ID: " ID
|
xread "ID: " ID
|
||||||
|
xread "Bootstrap bridge:" BOOSTRAP_BRIDGE
|
||||||
readBridgeVars
|
readBridgeVars
|
||||||
|
|
||||||
echo "# Reverting gate's WAN bridge to: vmbr${WAN_BRIDGE}..."
|
echo "# Reverting gate's WAN bridge to: vmbr${WAN_BRIDGE}..."
|
||||||
@ sed -i \
|
@ sed -i \
|
||||||
-e 's/^\(net0.*vmbr\)'${ADMIN_BRIDGE}'/\1'${WAN_BRIDGE}'/' \
|
-e 's/^\(net0.*vmbr\)'${BOOSTRAP_BRIDGE}'/\1'${WAN_BRIDGE}'/' \
|
||||||
/etc/pve/lxc/${ID}.conf
|
/etc/pve/lxc/${ID}.conf
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -59,8 +60,9 @@ fi
|
|||||||
# Bootstrap...
|
# Bootstrap...
|
||||||
|
|
||||||
if ! [ -z $BOOTSTRAP ] ; then
|
if ! [ -z $BOOTSTRAP ] ; then
|
||||||
|
xread "Bootstrap bridge:" BOOSTRAP_BRIDGE
|
||||||
# this will allow the bootstrapped CTs to access the network...
|
# this will allow the bootstrapped CTs to access the network...
|
||||||
WAN_BRIDGE=${ADMIN_BRIDGE}
|
WAN_BRIDGE=${BOOSTRAP_BRIDGE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
# NOTE: this assumes the ADMIN bridge to exist (proxmox default) and to be vmbr0...
|
|
||||||
|
|
||||||
auto vmbr${LAN_BRIDGE}
|
auto vmbr${LAN_BRIDGE}
|
||||||
iface vmbr${LAN_BRIDGE} inet manual
|
iface vmbr${LAN_BRIDGE} inet manual
|
||||||
bridge-ports none
|
bridge-ports none
|
||||||
@ -15,3 +13,11 @@ iface vmbr${WAN_BRIDGE} inet manual
|
|||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#WAN
|
#WAN
|
||||||
|
|
||||||
|
auto vmbr${ADMIN_BRIDGE}
|
||||||
|
iface vmbr${ADMIN_BRIDGE} inet static
|
||||||
|
address ${HOST_ADMIN_IP}
|
||||||
|
bridge-ports ${BOOTSTRAP_ADMIN_BRIDGE}
|
||||||
|
bridge-stp off
|
||||||
|
bridge-fd 0
|
||||||
|
#ADMIN
|
||||||
|
|
||||||
|
|||||||
@ -16,9 +16,8 @@ iface vmbr${WAN_BRIDGE} inet manual
|
|||||||
auto vmbr${ADMIN_BRIDGE}
|
auto vmbr${ADMIN_BRIDGE}
|
||||||
iface vmbr${ADMIN_BRIDGE} inet static
|
iface vmbr${ADMIN_BRIDGE} inet static
|
||||||
address ${HOST_ADMIN_IP}
|
address ${HOST_ADMIN_IP}
|
||||||
#gateway ${GATE_ADMIN_IPn}
|
gateway ${GATE_ADMIN_IPn}
|
||||||
#bridge-ports ${ADMIN_PORT}
|
bridge-ports ${ADMIN_PORT}
|
||||||
bridge-ports none
|
|
||||||
bridge-stp off
|
bridge-stp off
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#ADMIN
|
#ADMIN
|
||||||
|
|||||||
11
host/make.sh
11
host/make.sh
@ -48,6 +48,7 @@ BRIDGES_TPL=bridges.tpl
|
|||||||
|
|
||||||
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
|
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
|
||||||
# XXX switch admin interface IP and Gateway to admin net...
|
# XXX switch admin interface IP and Gateway to admin net...
|
||||||
|
#
|
||||||
# update ADMIN_BRIDGE:
|
# update ADMIN_BRIDGE:
|
||||||
# - set gateway
|
# - set gateway
|
||||||
# - set bridge port to admin port
|
# - set bridge port to admin port
|
||||||
@ -59,10 +60,12 @@ fi
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Bootstrap...
|
# Bootstrap...
|
||||||
|
|
||||||
|
# XXX
|
||||||
if ! [ -z $BOOTSTRAP ] ; then
|
if ! [ -z $BOOTSTRAP ] ; then
|
||||||
# XXX
|
DFL_BOOTSTRAP_ADMIN_PORT=${DFL_BOOTSTRAP_ADMIN_PORT:-none}
|
||||||
#BRIDGES_TPL=bootstrap-bridges.tpl
|
xread "Bootstrap port: " BOOTSTRAP_ADMIN_PORT
|
||||||
true
|
|
||||||
|
BRIDGES_TPL=bootstrap-bridges.tpl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -122,7 +125,7 @@ if xreadYes "# Create bridges?" BRIDGES ; then
|
|||||||
cat "$BRIDGES_TPL" \
|
cat "$BRIDGES_TPL" \
|
||||||
| expandPCTTemplate \
|
| expandPCTTemplate \
|
||||||
LAN_BRIDGE WAN_BRIDGE ADMIN_BRIDGE \
|
LAN_BRIDGE WAN_BRIDGE ADMIN_BRIDGE \
|
||||||
WAN_PORT ADMIN_PORT \
|
WAN_PORT ADMIN_PORT BOOTSTRAP_ADMIN_PORT \
|
||||||
HOST_ADMIN_IP GATE_ADMIN_IP)"
|
HOST_ADMIN_IP GATE_ADMIN_IP)"
|
||||||
|
|
||||||
if [ -z "$DRY_RUN" ] ; then
|
if [ -z "$DRY_RUN" ] ; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user