diff options
| author | Christian Hopps <chopps@labn.net> | 2023-03-08 17:22:09 -0500 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-03-21 22:08:32 -0400 |
| commit | 1c84efe4fa8585df58a9b53459f94c47934f0786 (patch) | |
| tree | 21609ad9048500a6b23c38ce373506d5d6aa6ac3 /pkgsrc | |
| parent | ed851381b578fda5c313ea0cb6a2e9d3fb017cce (diff) | |
mgmtd: Bringup MGMTD daemon and datastore module support
Features added in this commit:
1. Bringup/shutdown new management daemon 'mgmtd' along with FRR.
2. Support for Startup, Candidate and Running DBs.
3. Lock/Unlock DS feature using pthread lock.
4. Load config from a JSON file onto candidate DS.
5. Save config to a JSON file from running/candidate DS.
6. Dump candidate or running DS contents on the terminal or a file in
JSON/XML format.
7. Maintaining commit history (Full rollback support to be added in
future commits).
8. Addition of debug commands.
Co-authored-by: Yash Ranjan <ranjany@vmware.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
Diffstat (limited to 'pkgsrc')
| -rw-r--r-- | pkgsrc/mgmtd.sh.in | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgsrc/mgmtd.sh.in b/pkgsrc/mgmtd.sh.in new file mode 100644 index 0000000000..fb57c0a2fb --- /dev/null +++ b/pkgsrc/mgmtd.sh.in @@ -0,0 +1,44 @@ +#!/bin/sh +# +# mgmtd is part of the quagga routing beast +# +# PROVIDE: mgmtd +# REQUIRE: none +## + +PATH=/sbin:/bin:/usr/sbin:/usr/bin:@prefix@/sbin:@prefix@/bin +export PATH + +if [ -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +name="mgmtd" +rcvar=$name +required_files="@sysconfdir@/${name}.conf" +command="@prefix@/sbin/${name}" +command_args="-d" + +start_precmd="zebra_precmd" +socket_dir=@localstatedir@ +pidfile="${socket_dir}/${name}.pid" + +zebra_precmd() +{ + rc_flags="$( + set -- $rc_flags + while [ $# -ne 0 ]; do + if [ X"$1" = X-P -o X"$1" = X-A ]; then + break + fi + shift + done + if [ $# -eq 0 ]; then + echo "-P 0" + fi + ) $rc_flags" +} + +load_rc_config $name +run_rc_command "$1" |
