mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-17 09:01:49 +00:00
working on host...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3f0e00b821
commit
c880780e48
@ -473,10 +473,11 @@ PCT_TEMPLATE_VARS=(
|
||||
EMAIL
|
||||
DOMAIN
|
||||
CTHOSTNAME
|
||||
HOST_ADMIN_IP
|
||||
GATE_HOSTNAME
|
||||
NS_HOSTNAME
|
||||
GATE_LAN_IP
|
||||
GATE_ADMIN_IP
|
||||
NS_HOSTNAME
|
||||
NS_LAN_IP
|
||||
NS_ADMIN_IP
|
||||
WAN_IP
|
||||
@ -532,8 +533,8 @@ expandTemplate(){
|
||||
|
||||
|
||||
#
|
||||
# expandTemplate PATH [VAR ...]
|
||||
# .. | expandTemplate [VAR ...]
|
||||
# expandPCTTemplate PATH [VAR ...]
|
||||
# .. | expandPCTTemplate [VAR ...]
|
||||
#
|
||||
expandPCTTemplate(){
|
||||
local input=
|
||||
|
||||
@ -85,6 +85,9 @@ DFL_PCT_EXTRA=SKIP
|
||||
# can be left as-is.
|
||||
#
|
||||
|
||||
# host
|
||||
HOST_ADMIN_IP=10.0.0.245/24
|
||||
|
||||
# Nameserver
|
||||
NS_HOSTNAME=ns
|
||||
NS_ID=100
|
||||
|
||||
24
host/bridges.tpl
Normal file
24
host/bridges.tpl
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
auto vmbr0
|
||||
iface vmbr0 inet manual
|
||||
bridge-ports none
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
#LAN
|
||||
|
||||
auto vmbr1
|
||||
iface vmbr2 inet manual
|
||||
bridge-ports ${WAN_PORT}
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
#WAN
|
||||
|
||||
auto vmbr2
|
||||
iface vmbr3 inet static
|
||||
address ${HOST_ADMIN_IP}
|
||||
gateway ${GATE_ADMIN_IPn}
|
||||
bridge-ports ${ADMIN_PORT}
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
#ADMIN
|
||||
|
||||
25
host/make.sh
25
host/make.sh
@ -10,11 +10,22 @@ PATH=$PATH:$(dirname "$(pwd)")
|
||||
source ../.pct-helpers
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
need ifupdown2
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
readConfig
|
||||
|
||||
|
||||
DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0}
|
||||
DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0}
|
||||
|
||||
# XXX move this to root config...
|
||||
DFL_HOST_ADMIN_IP=${PROXMOX_ADMIN_IP:-10.0.0.254/24}
|
||||
|
||||
SOFTWARE=(
|
||||
make
|
||||
w3m links
|
||||
@ -38,7 +49,19 @@ fi
|
||||
|
||||
# Networking
|
||||
if xreadYes "# Create bridges?" BRIDGES ; then
|
||||
echo
|
||||
xread "WAN port: " WAN_PORT
|
||||
xread "ADMIN port: " ADMIN_PORT
|
||||
xread "Host ADMIN IP: " HOST_ADMIN_IP
|
||||
xread "Gate ADMIN IP: " GATE_ADMIN_IP
|
||||
|
||||
INTERFACES="${cat bridges.tpl \
|
||||
| expandPCTTemplate}"
|
||||
|
||||
# XXX add $INTERFACES to /etc/network/interfaces either before the
|
||||
# source command or at the end...
|
||||
# XXX
|
||||
|
||||
#@ ifupdown2 -a
|
||||
fi
|
||||
|
||||
# Firewall
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user