From 19d289c45694468c655b4f92a6e60c286343f19b Mon Sep 17 00:00:00 2001 From: "Carl D. Roth" Date: Tue, 26 Dec 2017 17:48:39 -0800 Subject: [PATCH] Use onie-sysinfo rather than /etc/machine.conf --- builds/any/installer/installer.sh.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/builds/any/installer/installer.sh.in b/builds/any/installer/installer.sh.in index e3d968aa..6711709d 100644 --- a/builds/any/installer/installer.sh.in +++ b/builds/any/installer/installer.sh.in @@ -144,7 +144,14 @@ if test "$installer_debug"; then fi # Pickup ONIE defines for this machine. -if test -r /etc/machine.conf; then +if test "$onie_platform"; then + : +else + onie_platform=$(onie-sysinfo -p 2>/dev/null) || : +fi +if test "$onie_platform"; then + : +elif test -r /etc/machine.conf; then . /etc/machine.conf fi @@ -252,7 +259,7 @@ if test "${onie_platform}"; then } else if test "$ARCH_X86"; then - echo "Missing onie_platform (invalid /etc/machine.conf)" 1>&2 + echo "Missing onie_platform (invalid or missing onie-sysinfo or /etc/machine.conf)" 1>&2 exit 1 fi #