mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-06 16:08:22 +00:00
Fix NetworkManager hotspot readiness
This commit is contained in:
parent
0f20889948
commit
3340108acd
5 changed files with 136 additions and 4 deletions
|
|
@ -79,6 +79,12 @@ same_boot_mode_contract() {
|
|||
grep -q 'wait_for_diagnostics onion' "$ROOT/usr/local/lib/pivilion/mode.sh"
|
||||
}
|
||||
|
||||
networkmanager_startup_contract() {
|
||||
grep -q 'pivilion_nm_prepare_interface "$IFACE"' "$ROOT/usr/local/lib/pivilion/mode.sh" &&
|
||||
grep -q 'pivilion_nm_connection_up "$NM_HOTSPOT" "$IFACE"' "$ROOT/usr/local/lib/pivilion/mode.sh" &&
|
||||
grep -q 'nmcli connection up "$connection" ifname "$iface"' "$ROOT/usr/local/lib/pivilion/networkmanager.sh"
|
||||
}
|
||||
|
||||
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"
|
||||
|
|
@ -95,6 +101,8 @@ run "truthful runtime state contract" state_contract
|
|||
run "agetty login-banner contract" tty_banner_contract
|
||||
run "canonical boot configuration contract" boot_config_contract
|
||||
run "same-boot hotspot and onion activation contract" same_boot_mode_contract
|
||||
run "NetworkManager software-radio and delayed-device handling" "$ROOT/tests/test-networkmanager.sh"
|
||||
run "NetworkManager hotspot startup contract" networkmanager_startup_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