OpenNetworkLinux icon indicating copy to clipboard operation
OpenNetworkLinux copied to clipboard

onie-sysinfo always get unknown issue

Open clementchu-wnc opened this issue 5 years ago • 2 comments

Hello, On ONL, I use the onie-sysinfo but always get unknown:

root@localhost:~# onie-sysinfo unknown

The command onie-sysinfo will find the onie initrd image and unpack it, and then it chroot to the upacked directory and excutue onie-sysinfo shell. Finally the result returns the onie_platform information acoording the machine.conf.

But in the unpacked environment, the file machine.conf is not exist. So the command result always returns unknown.

Has anyone run into the same problem?

clementchu-wnc avatar May 01 '20 07:05 clementchu-wnc

I have the same problem as you, have you solved it?

laiguoliang-lyr avatar Sep 01 '20 02:09 laiguoliang-lyr

Workaround: In $ONIE/rootconf/default/lib/onie/functions, run gen-config.sh to create /etc/machine.conf.

...
##
## This assumes the shell is ash/dash.
##
/etc/init.d/gen-config.sh start

[ -r /etc/machine.conf ] && . /etc/machine.conf

export onie_installer="/var/tmp/installer" 
...

clementchu-wnc avatar Sep 11 '20 01:09 clementchu-wnc