Getting the device name from device

Hi,

Which file has to be modified in the device to change the device name on the aikaan webpage?

Hi @siddharthmunot,
You can change the name of a device by writing a shell script file and saving it in /opt/aikaan/bin/support/inventory/ directory with the file name starting with mender-inventory- . The contents of the file should have key-value pairs. The key should be device_name and the value can be expected device name.
For example, if you wish the device name to be “Edge-CPU” then the shell script would be

#!/bin/sh
echo "device_name=Edge-CPU" 

Provide proper permission for the file and wait for minutes.
Note: Avoid using blank spaces in the device name

Thanks Shreeram, will try that out.

Hello @shreeram . I tried to follow this tutorial but the device name is not reflecting on the portal.
I even tried this tutorial

But even after 30 minutes the device name is not reflected.

NOTE: One note is that there is no inventory directory inside /opt/aikaan/etc/support/. I have to create it manually and then Again I created mender-inventory-devicename.sh file manually and added content as you mentioned.

Hi @kishan,
The inventory directory will be present inside /opt/aikaan/bin/support and not inside /opt/aikaan/etc. The script file is correct. Please try again with the correct directory path.

Note: Make sure to provide executable permission for the script file (In your case: mender-inventory-devicename.sh)

Ok i will try to correct the parth but in the previous post directory is mentioned inside etc

Oh yes.
I have corrected it now. I am specifying the correct path again so that there won’t be any more confusions.
The path is: /opt/aikaan/bin/support/inventory

Yes I have corrected the path in the device as well. I will report you status after an hour so we can check wether it is reflected or not

PS: we are using exprience.aikaan.io