Skip to content

Commit

Permalink
[radvd] Ensure at least one interface is specified in radvd.conf befo…
Browse files Browse the repository at this point in the history
…re starting radvd (#1636)
  • Loading branch information
jleveque authored and lguohan committed Apr 26, 2018
1 parent a84ca2d commit f46e873
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dockers/docker-router-advertiser/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,12 @@ fi
# Generate /etc/radvd.conf config file
sonic-cfggen -d -t /usr/share/sonic/templates/radvd.conf.j2 > /etc/radvd.conf

# Enusre at least one interface is specified in radvd.conf
NUM_IFACES=$(grep -c "^interface " /etc/radvd.conf)
if [ $NUM_IFACES -eq 0 ]; then
echo "No interfaces specified in radvd.conf. Not starting router advertiser process."
exit 0
fi

# Start the router advertiser
supervisorctl start radvd

0 comments on commit f46e873

Please sign in to comment.