mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-20 18:41:47 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a0b7e2c9d1
commit
c898c0c874
26
.pct-helpers
26
.pct-helpers
@ -371,6 +371,8 @@ webAppConfig(){
|
||||
|
||||
#
|
||||
# readVars
|
||||
# readCTHardwareVars
|
||||
# readBridgeVars
|
||||
#
|
||||
# Variables this handles:
|
||||
# EMAIL
|
||||
@ -396,22 +398,28 @@ webAppConfig(){
|
||||
# TMP_PASS_LEN
|
||||
# ROOTPASS
|
||||
#
|
||||
readCTHardwareVars(){
|
||||
# hardware...
|
||||
xread "CPU cores: " CORES
|
||||
xread "RAM (MB): " RAM
|
||||
xread "SWAP (MB): " SWAP
|
||||
xread "DRIVE (GB): " DRIVE
|
||||
}
|
||||
readBridgeVars(){
|
||||
# bridge config...
|
||||
xread "WAN bridge: vmbr" WAN_BRIDGE
|
||||
xread "LAN bridge: vmbr" LAN_BRIDGE
|
||||
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
|
||||
}
|
||||
readVars(){
|
||||
xread -n "Email: " EMAIL
|
||||
xread -n "Domain: " DOMAIN
|
||||
xread "ID: " ID
|
||||
xread "Hostname: " CTHOSTNAME
|
||||
|
||||
# hardware...
|
||||
xread "CPU cores: " CORES
|
||||
xread "RAM (MB): " RAM
|
||||
xread "SWAP (MB): " SWAP
|
||||
xread "DRIVE (GB): " DRIVE
|
||||
readCTHardwareVars
|
||||
|
||||
# bridge config...
|
||||
xread "WAN bridge: vmbr" WAN_BRIDGE
|
||||
xread "LAN bridge: vmbr" LAN_BRIDGE
|
||||
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
|
||||
readBridgeVars
|
||||
|
||||
# gateway...
|
||||
# IPs can be:
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
|
||||
auto vmbr0
|
||||
iface vmbr0 inet manual
|
||||
auto vmbr${LAN_BRIDGE}
|
||||
iface vmbr${LAN_BRIDGE} inet manual
|
||||
bridge-ports none
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
#LAN
|
||||
|
||||
auto vmbr1
|
||||
iface vmbr2 inet manual
|
||||
auto vmbr${WAN_BRIDGE}
|
||||
iface vmbr${WAN_BRIDGE} inet manual
|
||||
bridge-ports ${WAN_PORT}
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
#WAN
|
||||
|
||||
auto vmbr2
|
||||
iface vmbr3 inet static
|
||||
auto vmbr${ADMIN_BRIDGE}
|
||||
iface vmbr${ADMIN_BRIDGE} inet static
|
||||
address ${HOST_ADMIN_IP}
|
||||
gateway ${GATE_ADMIN_IPn}
|
||||
bridge-ports ${ADMIN_PORT}
|
||||
|
||||
11
host/make.sh
11
host/make.sh
@ -37,6 +37,10 @@ SOFTWARE=(
|
||||
)
|
||||
|
||||
|
||||
# XXX
|
||||
#readVars
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
# Tools
|
||||
@ -54,22 +58,25 @@ fi
|
||||
# - setup the gate, ssh, and wireguard
|
||||
# - inalize
|
||||
# XXX /etc/hosts
|
||||
# XXX should we do things in ./staging ???
|
||||
if xreadYes "# Create bridges?" BRIDGES ; then
|
||||
xread "WAN port: " WAN_PORT
|
||||
xread "ADMIN port: " ADMIN_PORT
|
||||
xread "Host ADMIN IP: " HOST_ADMIN_IP
|
||||
xread "Gate ADMIN IP: " GATE_ADMIN_IP
|
||||
readBridgeVars
|
||||
|
||||
@ cp /etc/network/interfaces{,.new}
|
||||
|
||||
BRIDGES="${\
|
||||
cat bridges.tpl \
|
||||
| expandPCTTemplate WAN_PORT ADMIN_PORT}"
|
||||
|
||||
@ cp /etc/network/interfaces{,.new}
|
||||
|
||||
# XXX add $BRIDGES to /etc/network/interfaces either before the
|
||||
# source command or at the end...
|
||||
# XXX
|
||||
|
||||
# review/apply setup...
|
||||
echo "# Review updated: /etc/network/interfaces.new:"
|
||||
@ cat /etc/network/interfaces.new
|
||||
echo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user