From 66dedf38c2305d1a9f934bf84f7d65a2911dd2dc Mon Sep 17 00:00:00 2001 From: Kuanyu Chen Date: Tue, 20 Apr 2021 02:40:52 +0800 Subject: [PATCH] [config-setup]: Fix a bug in checking if updategraph is enabled (#7093) Encounter error during "config-setup boot" if the updategraph is enabled. How I did it Correct the code inside the config-setup script. Remove the space between the assignment operator. How to verify it Remove the /etc/sonic/config_db.json and reboot the device. Originally, it will return following error after boot up. rv: command not found After modification, it can correctly parse the status of updategraph without error. --- files/image_config/config-setup/config-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index 9bb7b33b6b..0006b69695 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -158,7 +158,7 @@ updategraph_is_enabled() rv=1 if [ -e ${UPDATEGRAPH_CONF} ]; then updategraph_mode=$(grep enabled ${UPDATEGRAPH_CONF} | head -n 1 | cut -f2 -d=) - [ "${updategraph_mode}" = "true" ] && rv = 0 + [ "${updategraph_mode}" = "true" ] && rv=0 fi return $rv }