mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-28 17:12:22 +00:00
ucentral-client: prevent client from starting before cloud was discovered
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -44,14 +44,15 @@ start_service() {
|
||||
|
||||
server=$(cat /etc/ucentral/gateway.json | jsonfilter -e '@["server"]')
|
||||
port=$(cat /etc/ucentral/gateway.json | jsonfilter -e '@["port"]')
|
||||
[ -n "$server" -a -n "$port" ] || return 0
|
||||
|
||||
boot_cause=$(cat /tmp/pstore | jsonfilter -e '@["pstore"][-1]'.boot_cause)
|
||||
[ -z $boot_cause ] && boot_cause=coldboot
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
[ -n "$serial" ] && procd_append_param command -S $serial
|
||||
[ -n "$server" ] && procd_append_param command -s $server
|
||||
[ -n "$port" ] && procd_append_param command -P $port
|
||||
procd_append_param command -s $server
|
||||
procd_append_param command -P $port
|
||||
[ "$debug" -eq 0 ] || procd_append_param command -d
|
||||
[ "$insecure" -eq 0 ] || procd_append_param command -i
|
||||
[ -z "$(mount | grep 'tmpfs on / type tmpfs')" ] || procd_append_param command -r
|
||||
|
||||
Reference in New Issue
Block a user