mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-07 00:18:23 +00:00
Add canonical boot configuration synchronization
This commit is contained in:
parent
254a9b9cf3
commit
eda151065c
14 changed files with 424 additions and 50 deletions
|
|
@ -24,6 +24,10 @@ export PIVILION_CONFIG_PATHS="$TMP/primary.conf $TMP/fallback.conf"
|
|||
export PIVILION_STATE_DIR="$TMP/run"
|
||||
export PIVILION_STATE_FILE="$TMP/run/status.tsv"
|
||||
source "$ROOT/usr/local/lib/pivilion/common.sh"
|
||||
PIVILION_BOOT_ROOT="$TMP/boot"
|
||||
export PIVILION_BOOT_ROOT
|
||||
[ "$(pivilion_boot_config_path)" = "$TMP/boot/pivilion.conf" ]
|
||||
unset PIVILION_BOOT_ROOT
|
||||
pivilion_load_config
|
||||
|
||||
[ "$PIVILION_MODE" = hotspot ]
|
||||
|
|
@ -32,7 +36,7 @@ pivilion_load_config
|
|||
|
||||
install -d "$PIVILION_DIR" "$PIVILION_STATE_DIR"
|
||||
printf 'onion\n' > "$PIVILION_DIR/mode"
|
||||
[ "$(pivilion_current_mode)" = onion ]
|
||||
[ "$(pivilion_current_mode)" = hotspot ]
|
||||
cat > "$PIVILION_STATE_FILE" <<EOF
|
||||
desired_mode onion
|
||||
active_mode hotspot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue