Skip to content

Commit

Permalink
[voq][chassis][dhcp_relay] swss.sh try to start the dhcp_relay servic…
Browse files Browse the repository at this point in the history
…e althoug it is masked

Signed-off-by: mlok <marty.lok@nokia.com>
  • Loading branch information
mlok-nokia committed Jun 12, 2024
1 parent de23068 commit 5f12fdf
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,17 @@ function clean_up_chassis_db_tables()

}

is_feature_enabled()
{
s=$1
service=${s%@*}
state=$(sonic-db-cli CONFIG_DB hget "FEATURE|${service}" "state")
if [[ $state == "enabled" ]]; then
echo "true"
else
echo "false"
fi
}
start_peer_and_dependent_services() {
check_warm_boot

Expand All @@ -254,7 +265,10 @@ start_peer_and_dependent_services() {
fi
done
for dep in ${DEPENDENT}; do
/bin/systemctl start ${dep}
state=$(is_feature_enabled $dep)
if [[ $state == "true" ]]; then
/bin/systemctl start ${dep}
fi
done
for dep in ${MULTI_INST_DEPENDENT}; do
if [[ ! -z $DEV ]]; then
Expand Down

0 comments on commit 5f12fdf

Please sign in to comment.