mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-06 16:08:22 +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
10
tests/run.sh
10
tests/run.sh
|
|
@ -58,6 +58,15 @@ tty_banner_contract() {
|
|||
! grep -Eq '(^|[[:space:]])/etc/issue([[:space:]]|$)' "$ROOT/install.sh"
|
||||
}
|
||||
|
||||
boot_config_contract() {
|
||||
grep -q 'pivilion_boot_config_path' "$ROOT/usr/local/lib/pivilion/config-sync.sh" &&
|
||||
grep -q 'pivilion.conf.last-good' "$ROOT/usr/local/lib/pivilion/config-sync.sh" &&
|
||||
grep -q 'derive_psk' "$ROOT/usr/local/lib/pivilion/config-sync.sh" &&
|
||||
grep -q 'Before=.*NetworkManager' "$ROOT/etc/systemd/system/pivilion-config.service" &&
|
||||
grep -q 'config-sync.sh set PIVILION_MODE' "$ROOT/usr/local/bin/hotspot" &&
|
||||
grep -q 'config-sync.sh set-wifi' "$ROOT/usr/local/bin/pikey"
|
||||
}
|
||||
|
||||
shellcheck_scripts() {
|
||||
command -v shellcheck >/dev/null 2>&1 || return 0
|
||||
shellcheck "$ROOT/install.sh" "$ROOT"/usr/local/lib/pivilion/*.sh "$ROOT"/usr/local/bin/pivilion* "$ROOT/usr/local/bin/hotspot" "$ROOT/usr/local/bin/onion" "$ROOT/usr/local/bin/pikey"
|
||||
|
|
@ -71,6 +80,7 @@ run "temporary HTTP-only captive rules" captive_rules
|
|||
run "transactional installer safety contract" installer_safety
|
||||
run "truthful runtime state contract" state_contract
|
||||
run "agetty login-banner contract" tty_banner_contract
|
||||
run "canonical boot configuration contract" boot_config_contract
|
||||
run "ShellCheck (when installed)" shellcheck_scripts
|
||||
|
||||
[ "$failures" -eq 0 ] || { echo "$failures test group(s) failed." >&2; exit 1; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue