Skip to content

Commit

Permalink
[image]: remove quote for build_version in /etc/sonic/sonic_version.y…
Browse files Browse the repository at this point in the history
…ml (#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 <gulv@microsoft.com>
  • Loading branch information
lguohan authored Mar 19, 2018
1 parent 5034d69 commit 56efb41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion files/image_config/platform/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion installer/x86_64/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 56efb41

Please sign in to comment.