Skip to content

Commit f46e873

Browse files
jlevequelguohan
authored andcommitted
[radvd] Ensure at least one interface is specified in radvd.conf before starting radvd (#1636)
1 parent a84ca2d commit f46e873

File tree

1 file changed

+7
-0
lines changed
  • dockers/docker-router-advertiser

1 file changed

+7
-0
lines changed

dockers/docker-router-advertiser/start.sh

+7
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,12 @@ fi
1414
# Generate /etc/radvd.conf config file
1515
sonic-cfggen -d -t /usr/share/sonic/templates/radvd.conf.j2 > /etc/radvd.conf
1616

17+
# Enusre at least one interface is specified in radvd.conf
18+
NUM_IFACES=$(grep -c "^interface " /etc/radvd.conf)
19+
if [ $NUM_IFACES -eq 0 ]; then
20+
echo "No interfaces specified in radvd.conf. Not starting router advertiser process."
21+
exit 0
22+
fi
23+
1724
# Start the router advertiser
1825
supervisorctl start radvd

0 commit comments

Comments
 (0)