From 47fba4d86ffaf0d1e30946a20221ab96df1d70b4 Mon Sep 17 00:00:00 2001 From: Oliver Kraitschy Date: Tue, 13 Oct 2020 10:51:33 +0200 Subject: [PATCH] [agent] Send extended device info after config is updated --- openwisp-config/files/openwisp.agent | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openwisp-config/files/openwisp.agent b/openwisp-config/files/openwisp.agent index 7611c8f8..1160ce52 100755 --- a/openwisp-config/files/openwisp.agent +++ b/openwisp-config/files/openwisp.agent @@ -358,6 +358,7 @@ update_info() { local model=$(get_model) local os=$(get_os) local system=$(get_system) + local hostname=$(uci get system.@system[0].hostname) # retry several times for i in $(seq 1 10); do $FETCH_COMMAND -i \ @@ -365,6 +366,7 @@ update_info() { --data-urlencode model="$model" \ --data-urlencode os="$os" \ --data-urlencode system="$system" \ + --data-urlencode name="$hostname" \ "$UPDATE_INFO_URL" > $UPDATE_INFO local exit_code=$? if [ "$exit_code" = "0" ]; then @@ -564,6 +566,9 @@ update_configuration() { else report_status "error" fi + + # send up to date device info + update_info } backup_configuration() {