From 56efb41f55d5c258f3bdbe5ce147cce4e97753d6 Mon Sep 17 00:00:00 2001 From: lguohan Date: Mon, 19 Mar 2018 00:53:47 -0700 Subject: [PATCH] [image]: remove quote for build_version in /etc/sonic/sonic_version.yml (#1512) commit 0965b33 added quote to build_version in /etc/sonic/sonic_version.yml, e.g., sonic_version : '20170104.10'. scripts to use the $sonic_version need to remove the quote. Signed-off-by: Guohan Lu --- files/image_config/platform/rc.local | 2 +- installer/x86_64/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 2ec4a72e53..a89b800d12 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -171,7 +171,7 @@ for x in "$@"; do done } -sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") +eval sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") if [ -f /host/image-$sonic_version/platform/firsttime ]; then diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index eef0eeee25..0e43213451 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -406,7 +406,7 @@ if [ "$install_env" = "onie" ]; then elif [ "$install_env" = "sonic" ]; then demo_mnt="/host" - running_sonic_revision=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") + eval running_sonic_revision=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") # Prevent installing existing SONiC if it is running if [ "$image_dir" = "image-$running_sonic_revision" ]; then echo "Not installing SONiC version $running_sonic_revision, as current running SONiC has the same version"