mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 18:50:08 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c18e82a199
commit
2df81dcf01
35
Makefile
35
Makefile
@ -60,7 +60,6 @@ check: check-message $(foreach dep,$(DEPENDENCIES),require($(dep)))
|
||||
FORCE:
|
||||
|
||||
|
||||
# XXX should thisbe an env var or an arg to make.sh???
|
||||
%-bootstrap: export BOOTSTRAP=1
|
||||
%-bootstrap: %
|
||||
@true
|
||||
@ -100,24 +99,24 @@ gate: gate-traefik
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
# XXX goal:
|
||||
# - build minimal system
|
||||
# - bootstrap bridge
|
||||
# - gate
|
||||
# - ns
|
||||
# ...not yet sure of the best way to do this...
|
||||
#
|
||||
# Bootstrap stage 1: build basic infrastructure...
|
||||
.PHONY: bootstrap
|
||||
bootstrap: host-bootstrap gate-bootstrap \
|
||||
ns \
|
||||
ssh \
|
||||
wireguard \
|
||||
bootstrap: \
|
||||
host-bootstrap \
|
||||
gate-bootstrap \
|
||||
ns ssh wireguard \
|
||||
bootstrap-clean
|
||||
|
||||
|
||||
# NOTE: host-bootstrap-clean will drop all connections to the server...
|
||||
.PHONY: bootstrap-clean
|
||||
bootstrap-clean: gate-bootstrap-clean #host-bootstrap-clean
|
||||
# Bootstrap stage 2: reconnect host through the base infrastructure...
|
||||
.PHONY: bootstrap-clean host-bootstrap-clean
|
||||
bootstrap-clean: host-bootstrap-clean
|
||||
|
||||
|
||||
# Finalize: reconect admin port/bridge correctly...
|
||||
.PHONY: finalize
|
||||
finalize: bootstrap-clean gate-bootstrap-clean
|
||||
@ make host-bootstrap-clean
|
||||
|
||||
|
||||
|
||||
@ -139,6 +138,12 @@ dev: minimal $(DEV_CTs)
|
||||
all: minimal $(APP_CTs)
|
||||
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo "TEST!"
|
||||
|
||||
test2: test test
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
16
host/make.sh
16
host/make.sh
@ -47,10 +47,20 @@ BRIDGES_TPL=bridges.tpl
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Bootstrap...
|
||||
|
||||
if ! [ -z $BOOTSTRAP_CLEAN ] \
|
||||
&& [ -e "$INTERFACES".clean ] ; then
|
||||
if ! [ -z $BOOTSTRAP_CLEAN ] ; then
|
||||
@ cp "$INTERFACES"{,.bak}
|
||||
@ cp "$INTERFACES"{.clean,.new}
|
||||
|
||||
# stage 1: bootstrap -> clean
|
||||
if [ -e "$INTERFACES".clean ] ; then
|
||||
@ mv "$INTERFACES"{.clean,.new}
|
||||
# stage 2: clean -> final
|
||||
elif [ -e "$INTERFACES".final ] ; then
|
||||
@ mv "$INTERFACES"{.final,.new}
|
||||
# donw
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
if reviewApplyChanges "$INTERFACES" ; then
|
||||
# XXX this must be done in nohup to avoid breaking on connection lost...
|
||||
if ! @ ifreload -a ; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user