kiosk-wifi-helper gains region-status/region-set. The country is persisted as a cfg80211 regdom module option and in the WiFi netplan file; locale and keyboard go through localectl, validated against what's installed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A97KUggSE3rBL8veDM5Mr4
9 lines
400 B
Bash
Executable File
9 lines
400 B
Bash
Executable File
#!/bin/bash
|
|
# Stand-in for kiosk-wifi-helper in api.test.js: echoes the action and stdin.
|
|
input=$(cat)
|
|
case "$1" in
|
|
region-status) echo '{"ok":true,"country":"US","locale":"en_US.UTF-8","keyboard":"us","locales":["en_US.UTF-8"],"keyboards":["us"]}' ;;
|
|
region-set) jq -cn --arg i "$input" '{ok:true,echo:$i,restart:true}' ;;
|
|
*) echo '{"ok":false,"error":"unknown"}' ;;
|
|
esac
|