onie-sysinfo always get unknown issue
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?
I have the same problem as you, have you solved it?
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"
...