james
December 15, 2021, 10:34am
1
I have created file under aikaan installation directory with content shown below
$cat /opt/aikaan/bin/support/inventory/mender-inventory-myattr
#!/bin/sh
raven_version=ACC1120_001.06.01
But these attributes are not appearing in the tags of device info page . I cloud see only the below tags. In which “customer” is manually added tag from Aikaan webpage and other two were defaults tags
How to make the attributes under mender-inventory-myattr to appear on cloud ?
Hi ,
can you make sure the file /opt/aikaan/bin/support/inventory/mender-inventory-myattr has executable permission. I suspect this is the issue.
I have verified on my devices, look below
a. The file path, name and permission
root@raspberrypi:/home/pi# ls -l /opt/aikaan/bin/support/inventory/mender-inventory-myAttr.sh
-rwxr-xr-x 1 root root 34 Jun 5 16:18 /opt/aikaan/bin/support/inventory/mender-inventory-myAttr.sh
root@raspberrypi:/home/pi#
The file content
root@raspberrypi:/home/pi# cat /opt/aikaan/bin/support/inventory/mender-inventory-myAttr.sh
#!/bin/bash
echo “device_temp=33”
root@raspberrypi:/home/pi#
The attribute seen on controller
Thanks
C
james
June 6, 2022, 12:57pm
3
Hai @chetansk
Thanks for the example script. The script was executable , but the content of the file was not containing the echo commands. as shown below
#!/bin/bash
device_temp=33
root@raspberrypi:/home/pi#
After updating the script now it is appearing on the cloud
Regards,
James A
Good this is working… Also I did not realise that echo was missing in your script.
Thanks
C