Compare commits

..

No commits in common. "73b4a27b9d3550e330c024a79b45a469acd33e58" and "bf48fd61b5f1f438be5b4edd26f0ac8cd501c0f5" have entirely different histories.

5 changed files with 10 additions and 74 deletions

View File

@ -263,14 +263,9 @@ xreadYes(){
}
#
# xreadpass [msg] VAR
# xreadpass VAR
#
xreadpass(){
local msg
if [[ $# == 2 ]] ; then
msg="$1 "
shift
fi
if [[ ${!1} == 'SKIP' ]] ; then
return
fi
@ -281,7 +276,7 @@ xreadpass(){
local PASS1
local PASS2
for attempt in 1 2 3 ; do
read -sep "${prefix}${msg}password (Enter to skip): " PASS1
read -sep "${prefix}password (Enter to skip): " PASS1
echo
if [ -z $PASS1 ] ; then
return
@ -518,7 +513,7 @@ readVars(){
# root password...
if [ -z $ROOTPASS ] ; then
xreadpass root PASS \
xreadpass PASS \
|| exit 1
else
PASS=$ROOTPASS

View File

@ -63,12 +63,12 @@ FORCE:
# XXX should thisbe an env var or an arg to make.sh???
%-bootstrap: export BOOTSTRAP=1
%-bootstrap: %
@true
true
%-bootstrap-clean: export BOOTSTRAP_CLEAN=1
%-bootstrap-clean: %
@true
true
%: config %/make.sh FORCE
@ -110,11 +110,10 @@ gate: gate-traefik
.PHONY: bootstrap
bootstrap: host-bootstrap gate-bootstrap \
ns \
wireguard \
bootstrap-clean
.PHONY: bootstrap-clean
bootstrap-clean: gate-bootstrap-clean host-bootstrap-clean
bootstrap-clean: host-bootstrap-clean

View File

@ -37,46 +37,11 @@ LAN_GATE=SKIP
REBOOT=${REBOOT:=1}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Bootstrap cleanup...
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
ID=${GATE_ID:=${DFL_ID}}
xread "ID: " ID
readBridgeVars
# XXX update WAN ip... (???)
# XXX
echo "# Reverting gate's WAN bridge to vmbr${WAN_BRIDGE}..."
@ sed -i \
-e 's/^\(net0.*vmbr\)'${ADMIN_BRIDGE}'/\1'${WAN_BRIDGE}'/' \
/etc/pve/lxc/${ID}.conf
exit
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Bootstrap...
if ! [ -z $BOOTSTRAP ] ; then
# this will allow the bootstrapped CTs to access the network...
WAN_BRIDGE=$ADMIN_BRIDGE
#DFL_CTHOSTNAME=${DFL_CTHOSTNAME}-bootstrap
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
readVars
#----------------------------------------------------------------------
# XXX add interface bootstrap...
INTERFACES=(
"name=wan,bridge=vmbr${WAN_BRIDGE},firewall=1${WAN_GATE:+,gw=${WAN_GATE}}${WAN_IP:+,ip=${WAN_IP}},type=veth"

View File

@ -35,35 +35,12 @@ SOFTWARE=(
tmux
)
# XXX
#BRIDGES_TPL=bridges.tpl
BRIDGES_TPL=bootstrap-bridges.tpl
# XXX
#readVars
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Bootstrap...
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
# XXX switch admin interface IP and Gateway to admin net...
# XXX
exit
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Bootstrap...
if ! [ -z $BOOTSTRAP ] ; then
# XXX
BRIDGES_TPL=bootstrap-bridges.tpl
true
fi
#----------------------------------------------------------------------
# Tools

View File

@ -1,4 +1,4 @@
search srv
nameserver 127.0.0.1
nameserver ${NS_LAN_IPn}
nameserver 8.8.8.8
search srv
nameserver 127.0.0.1
nameserver ${NS_LAN_IPn}
nameserver 8.8.8.8