What is /deviceid ?

Free Internet troubleshooting agent for Centos, Ubuntu and others. Outages.io automatically finds connectivity issues and gives you hard facts.
Post Reply
kjellgrb
Posts: 4
Joined: Thu Aug 06, 2020 11:14 am

What is /deviceid ?

Post by kjellgrb »

Hi

In updater_linux_ocp.sh for Ubuntu in line 8
echo "$devid" >$filesetc/deviceid
This line create an empty file /deviceid

What is the purpose for /deviceid ?

Regards,
Benny

User avatar
Outages.io_Support
Posts: 100
Joined: Wed Feb 12, 2020 11:09 am

Re: What is /deviceid ?

Post by Outages.io_Support »

Hi,

When we build a firmware, we add an ID and a date to this file which represents the manufacturer/model of the device this firmware is running on.
When the starter script starts, it can look up which version of the agent it needs to download and if it's an embedded device, it can know if it needs to upgrade itself, things like that.

We maintain and test a fair number of makes/models for the hardware agents we use and we are trying to get to unified scripts that can work on everything we have. Some will use some things in the scripts, some won't.

So the answer is that for the Linux download, this is not used but the script is a common one that we use and some hardware devices would use the /etc/deviceid.

Hope this helps.
I'm with the Outages.io support team. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

kjellgrb
Posts: 4
Joined: Thu Aug 06, 2020 11:14 am

Re: What is /deviceid ?

Post by kjellgrb »

Hi,
I fully understand that you want to have unified scripts.

Perhaps you can change the line

Code: Select all

if [[ -n "${devid}" ]]; then
  echo "${devid}" >${filesetc}/deviceid
fi
Then you avoid to create empty/unused files but still have a unified script.

User avatar
Outages.io_Support
Posts: 100
Joined: Wed Feb 12, 2020 11:09 am

Re: What is /deviceid ?

Post by Outages.io_Support »

Thank you for the suggestion. I'll pass this on to the developers.

I hope you'll find Outages.io useful.
I'm with the Outages.io support team. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

User avatar
Outages.io_Support
Posts: 100
Joined: Wed Feb 12, 2020 11:09 am

Re: What is /deviceid ?

Post by Outages.io_Support »

Hi,

Can you let me know which version of the starter script you have? I believe it is 1.0.1.
In that version, that section looks like this.

#Version 1.0.1

# Enter the full path where you will be placing the starter_linux_otm.sh script into.
# Our example shows '/agent', change this to what ever your path is.
start="/agent"
#echo "$devid" >$filesetc/deviceid

And, I'm not sure why that line is there. It was probably left over from some testing and is not being used for the Linux version.
I'm with the Outages.io support team. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

kjellgrb
Posts: 4
Joined: Thu Aug 06, 2020 11:14 am

Re: What is /deviceid ?

Post by kjellgrb »

Can you let me know which version of the starter script you have?

Code: Select all

# fgrep Version /agent/updater_linux_ocp.sh 
#Version 1.0.1 
#
I created a new software agent for Ubuntu (id 126425) and the first lines of the script in installation procedure is :

Code: Select all

#!/bin/bash 

#Version 1.0.1 

# Enter the full path where you will be placing the starter_linux_otm.sh script into.
# Our example shows '/agent', change this to what ever your path is.
start="/agent"
echo "$devid" >$filesetc/deviceid 

echo "Make sure to create /etc/agentid with credentials before starting this script"

User avatar
Outages.io_Support
Posts: 100
Joined: Wed Feb 12, 2020 11:09 am

Re: What is /deviceid ?

Post by Outages.io_Support »

It turns out that line is not needed for Linux based installations and was left over from some testing.
All of those scripts have been updated. No need to download it again, simply remove that line.

Thanks for catching that and letting us know.
I'm with the Outages.io support team. Please post your question and I'll try to answer

Are the issues in your local network, with your Internet provider or beyond?
Save countless hours by letting Outages.io help you find Internet connection problems.

Post Reply