#include "command.h"
#include "vty.h"
#include "memory.h"
+#include "systemd.h"
#include "babel_main.h"
#include "babeld.h"
exit (1);
};
+ systemd_send_started (master);
/* init some quagga's dependencies, and babeld's commands */
babeld_quagga_init();
/* init zebra client's structure and it's commands */
static void
babel_fail(void)
{
+ systemd_send_stopping ();
exit(1);
}
unlink(pidfile);
debugf(BABEL_DEBUG_COMMON, "Done.");
+ systemd_send_stopping ();
exit(0);
}
#include "stream.h"
#include "queue.h"
#include "vrf.h"
+#include "systemd.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"
if (zlog_default)
closezlog (zlog_default);
+ systemd_send_stopping ();
exit (status);
}
/* Process ID file creation. */
pid_output (pid_file);
+ systemd_send_started (bm->master);
/* Make bgp vty socket. */
vty_serv_sock (vty_addr, vty_port, BGP_VTYSH_PATH);
#include "filter.h"
#include "zclient.h"
#include "vrf.h"
+#include "systemd.h"
#include "isisd/dict.h"
#include "include-netbsd/iso.h"
static __attribute__((__noreturn__)) void
terminate (int i)
{
+ systemd_send_stopping ();
exit (i);
}
if (pid_file[0] != '\0')
pid_output (pid_file);
+ systemd_send_started (master);
+
/* Make isis vty socket. */
vty_serv_sock (vty_addr, vty_port, ISIS_VTYSH_PATH);
#include "sigevent.h"
#include "zclient.h"
#include "vrf.h"
+#include "systemd.h"
#include "ospf6d.h"
#include "ospf6_top.h"
if (zlog_default)
closezlog (zlog_default);
+ systemd_send_stopping ();
exit (status);
}
/* pid file create */
pid_output (pid_file);
+ systemd_send_started (master);
+
/* Make ospf6 vty socket. */
if (!vty_port)
vty_port = OSPF6_VTY_PORT;
#include "sigevent.h"
#include "zclient.h"
#include "vrf.h"
+#include "systemd.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_interface.h"
}
/* Process id file create. */
pid_output (pid_file);
+
+ systemd_send_started (master);
vty_serv_sock (vty_addr, vty_port, vty_path);
/* Print banner. */
#include "zclient.h"
#include "plist.h"
#include "sockopt.h"
+#include "systemd.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_network.h"
/* ospfd being shut-down? If so, was this the last ospf instance? */
if (CHECK_FLAG (om->options, OSPF_MASTER_SHUTDOWN)
&& (listcount (om->ospf) == 0))
- exit (0);
+ {
+ systemd_send_stopping ();
+ exit (0);
+ }
return;
}
SET_FLAG (om->options, OSPF_MASTER_SHUTDOWN);
+ systemd_send_stopping ();
/* exit immediately if OSPF not actually running */
if (listcount(om->ospf) == 0)
exit(0);
#include "sigevent.h"
#include "zclient.h"
#include "vrf.h"
+#include "systemd.h"
#include "ripd/ripd.h"
if (! retain_mode)
rip_clean ();
+ systemd_send_stopping ();
exit (0);
}
exit (1);
}
+ systemd_send_started (master);
+
/* Pid file create. */
pid_output (pid_file);
#include "privs.h"
#include "sigevent.h"
#include "vrf.h"
+#include "systemd.h"
#include "ripngd/ripngd.h"
#include "privs.h"
#include "sigevent.h"
#include "vrf.h"
+#include "systemd.h"
#include "zebra/rib.h"
#include "zebra/zserv.h"
#endif
zebra_ptm_finish();
+ systemd_send_stopping();
exit (0);
}
if (daemon_mode && daemon (0, 0) < 0)
{
zlog_err("Zebra daemon failed: %s", strerror(errno));
+ systemd_send_stopping ();
exit (1);
}
/* Output pid of zebra. */
pid_output (pid_file);
+ systemd_send_started (zebrad.master);
/* After we have successfully acquired the pidfile, we can be sure
* about being the only copy of zebra process, which is submitting
* changes to the FIB.