During reload, we could send invalid information to the other
side and confuse it.
That's why, during reload we'll pause execution, do the reconfig
and resume + update when reload is done.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
reload_service() {
running || return 1
$LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
+ pause
unconfigure lldp custom-tlv
unconfigure system interface pattern
unconfigure system description
write_lldpd_conf
$LLDPCLI -u $LLDPSOCKET -c $LLDPD_CONF -c $LLDPD_CONFS_DIR &> /dev/null
# Broadcast update over the wire
- $LLDPCLI -u $LLDPSOCKET update &> /dev/null
+ $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
+ resume
+ update
+ EOF
return 0
}