Skip to content

Commit

Permalink
[installer]: support new onie machine.conf format (#1468)
Browse files Browse the repository at this point in the history
* [installer]: support new onie machine.conf format

onie_* variable are generated at runtime in /etc/machine.conf.
We can no longer copy the static machine.conf into sonic image.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
  • Loading branch information
lguohan authored Mar 18, 2018
1 parent 93f38de commit 15cd34f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion installer/x86_64/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,13 @@ unzip -op $ONIE_INSTALLER_PAYLOAD "$FILESYSTEM_DOCKERFS" | tar xz $TAR_EXTRA_OPT
if [ "$install_env" = "onie" ]; then
# Store machine description in target file system
cp /etc/machine.conf $demo_mnt
if [ -f /etc/machine-build.conf ]; then
# onie_ variable are generate at runtime.
# they are no longer hardcoded in /etc/machine.conf
set | grep ^onie_ > $demo_mnt/machine.conf
else
cp /etc/machine.conf $demo_mnt
fi
# Store installation log in target file system
rm -f $onie_initrd_tmp/tmp/onie-support*.tar.bz2
Expand Down

0 comments on commit 15cd34f

Please sign in to comment.