mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-26 05:12:06 +00:00
Compare commits
6 Commits
5f641957ad
...
046abf01f4
| Author | SHA1 | Date | |
|---|---|---|---|
| 046abf01f4 | |||
| a2bc69ba4f | |||
| ec250a5e39 | |||
| f9264a7901 | |||
| 3df2f47928 | |||
| 1ba72f247f |
@ -10,6 +10,10 @@ CT_DIR=${CT_DIR:=/etc/pve/lxc/}
|
|||||||
# XXX
|
# XXX
|
||||||
|
|
||||||
|
|
||||||
|
EDITOR=${EDITOR:-vim}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# XXX this is quite generic, might be a good idea to move this to a
|
# XXX this is quite generic, might be a good idea to move this to a
|
||||||
# seporate lib/file...
|
# seporate lib/file...
|
||||||
|
|||||||
@ -8,9 +8,9 @@ PROXMOX_UTILS=${PROXMOX_UTILS:-https://github.com/flynx/proxmox-utils.git}
|
|||||||
apt update
|
apt update
|
||||||
apt upgrade
|
apt upgrade
|
||||||
|
|
||||||
# keep this to the minimum...
|
# keep this to the minimum, at this point...
|
||||||
apt install \
|
apt install \
|
||||||
git make wget
|
git make wget vim
|
||||||
|
|
||||||
git clone $PROXMOX_UTILS
|
git clone $PROXMOX_UTILS
|
||||||
|
|
||||||
@ -19,4 +19,5 @@ cd proxmox-utils
|
|||||||
make bootstrap
|
make bootstrap
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# vim:set ts=4 sw=4 nowrap :
|
# vim:set ts=4 sw=4 nowrap :
|
||||||
|
|||||||
@ -28,9 +28,12 @@
|
|||||||
# LAN_BRIDGE=1
|
# LAN_BRIDGE=1
|
||||||
# ADMIN_BRIDGE=2
|
# ADMIN_BRIDGE=2
|
||||||
#
|
#
|
||||||
|
# NOTE: on a clean Proxmox install ADMIN is pre-setup, we will use it
|
||||||
|
# for bootstrapping and reconfigure it later.
|
||||||
|
#
|
||||||
|
ADMIN_BRIDGE=vmbr0
|
||||||
WAN_BRIDGE=
|
WAN_BRIDGE=
|
||||||
LAN_BRIDGE=
|
LAN_BRIDGE=
|
||||||
ADMIN_BRIDGE=
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE: it is simpler to statically assign these than to configure dhcp
|
# NOTE: it is simpler to statically assign these than to configure dhcp
|
||||||
|
|||||||
17
host/bootstrap-bridges.tpl
Normal file
17
host/bootstrap-bridges.tpl
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
# NOTE: this assumes the ADMIN bridge to exist (proxmox default) and to be vmbr0...
|
||||||
|
|
||||||
|
auto vmbr${LAN_BRIDGE}
|
||||||
|
iface vmbr${LAN_BRIDGE} inet manual
|
||||||
|
bridge-ports none
|
||||||
|
bridge-stp off
|
||||||
|
bridge-fd 0
|
||||||
|
#LAN
|
||||||
|
|
||||||
|
auto vmbr${WAN_BRIDGE}
|
||||||
|
iface vmbr${WAN_BRIDGE} inet manual
|
||||||
|
bridge-ports ${WAN_PORT}
|
||||||
|
bridge-stp off
|
||||||
|
bridge-fd 0
|
||||||
|
#WAN
|
||||||
|
|
||||||
@ -1,24 +1,24 @@
|
|||||||
|
|
||||||
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
|
||||||
bridge-stp off
|
bridge-stp off
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#LAN
|
#LAN
|
||||||
|
|
||||||
auto vmbr${WAN_BRIDGE}
|
auto vmbr${WAN_BRIDGE}
|
||||||
iface vmbr${WAN_BRIDGE} inet manual
|
iface vmbr${WAN_BRIDGE} inet manual
|
||||||
bridge-ports ${WAN_PORT}
|
bridge-ports ${WAN_PORT}
|
||||||
bridge-stp off
|
bridge-stp off
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#WAN
|
#WAN
|
||||||
|
|
||||||
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-stp off
|
bridge-stp off
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#ADMIN
|
#ADMIN
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,6 @@ need ifreload
|
|||||||
|
|
||||||
readConfig
|
readConfig
|
||||||
|
|
||||||
|
|
||||||
DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0}
|
DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0}
|
||||||
DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0}
|
DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0}
|
||||||
|
|
||||||
@ -36,6 +35,7 @@ SOFTWARE=(
|
|||||||
tmux
|
tmux
|
||||||
)
|
)
|
||||||
|
|
||||||
|
BRIDGES_TPL=bootstrap-bridges.tpl
|
||||||
|
|
||||||
# XXX
|
# XXX
|
||||||
#readVars
|
#readVars
|
||||||
@ -88,7 +88,7 @@ if xreadYes "# Create bridges?" BRIDGES ; then
|
|||||||
@ cp "$INTERFACES"{,.new}
|
@ cp "$INTERFACES"{,.new}
|
||||||
|
|
||||||
BRIDGES="$(\
|
BRIDGES="$(\
|
||||||
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 \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user