From: Ralph Ronnquist Date: Sun, 27 Mar 2022 07:55:21 +0000 (+1100) Subject: refactoring for more flexible config X-Git-Tag: deb_0.1.1~1 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=f86ce1827c0f74b3ac15598946b41477dd5a4066;p=rrq%2Foverlay-boot.git refactoring for more flexible config --- diff --git a/Makefile b/Makefile index aee4b75..4b77ede 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ MAN1FILES = MAN8FILES = overlay-boot.8 overlay-go.8 overlay-stop.8 HTMLDOC = $(MAN8FILES:%=%.html) VARLIBFILES = overlay-boot overlay-go overlay-stop functions reaper +VARLIBFILES += overlay-init overlay-postmount overlay-premount all: asm/reaper diff --git a/functions b/functions index 2c819fa..45a634a 100644 --- a/functions +++ b/functions @@ -31,7 +31,7 @@ subhost_config() { config UPPER "$BASE/root" config WORK "$BASE/work" config LOWER "/" - config START "!networking ssh" + config START "networking ssh" config PREMOUNT "$PROGRAMDIR/overlay-premount" config POSTMOUNT "$PROGRAMDIR/overlay-postmount" config INIT "$PROGRAMDIR/overlay-init" diff --git a/overlay-boot b/overlay-boot index d635da4..44bc76f 100755 --- a/overlay-boot +++ b/overlay-boot @@ -4,6 +4,7 @@ # configuration file named on the command line. # See "man overlay-boot" for details. +set -x PROGRAMDIR="$(dirname $(realpath $0))" . $PROGRAMDIR/functions diff --git a/overlay-boot.8.adoc b/overlay-boot.8.adoc index 9e39eec..932cae0 100644 --- a/overlay-boot.8.adoc +++ b/overlay-boot.8.adoc @@ -178,6 +178,7 @@ EXAMPLES ./opt/subhost/mta/mta.conf **** BASE=. +CABLES= = START= rsyslog newtorking ssh postfix **** @@ -185,5 +186,11 @@ The above example assumes a directory +/opt/subhost/mta+ that contains the configuration file +mta.conf+ and directories +root+, +work+ and +live+. *overlay-boot* will set up an overlay mount on +live+ with +root+ as UPPER, +work+ as WORK and +/+ as LOWER, i.e. an overlay of -the main host filesystem. +the main host filesystem. Further, the running subhost will feature a +virtual cable to the main host, where the subhost end is named +eth0+ +and the main host end is named +mta0+, and upon start, an +ifup mta0+ +is attempted at the host end while the subhost end is handled via its +neworking service. + +