summaryrefslogtreecommitdiff
path: root/net/openbgpd6/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/openbgpd6/files')
-rw-r--r--net/openbgpd6/files/COPYING21
-rw-r--r--net/openbgpd6/files/openbgpd.in35
-rw-r--r--net/openbgpd6/files/patch-Makefile.am20
-rw-r--r--net/openbgpd6/files/pkg-message.in6
4 files changed, 82 insertions, 0 deletions
diff --git a/net/openbgpd6/files/COPYING b/net/openbgpd6/files/COPYING
new file mode 100644
index 000000000000..e5897e688b8b
--- /dev/null
+++ b/net/openbgpd6/files/COPYING
@@ -0,0 +1,21 @@
+$FreeBSD$
+
+Copyright (c) 2003-2007 Henning Brauer <henning@openbsd.org>
+Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org>
+Copyright (c) 2003, 2004, 2006 Claudio Jeker <claudio@openbsd.org>
+Copyright (c) 2003, 2004 Markus Friedl <markus@openbsd.org>
+Copyright (c) 2004 Damien Miller <djm@openbsd.org>
+Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
+Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/net/openbgpd6/files/openbgpd.in b/net/openbgpd6/files/openbgpd.in
new file mode 100644
index 000000000000..cddf6528f2bb
--- /dev/null
+++ b/net/openbgpd6/files/openbgpd.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: bgpd
+# REQUIRE: LOGIN abi
+# BEFORE: securelevel
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable openbgpd:
+#
+# openbgpd_enable="YES"
+# openbgpd_flags="<set as needed>"
+#
+# See bgpd(8) for openbgpd_flags
+
+. /etc/rc.subr
+
+name=openbgpd
+rcvar=openbgpd_enable
+
+extra_commands=reload
+command="%%PREFIX%%/sbin/bgpd"
+required_files="%%PREFIX%%/etc/bgpd.conf"
+
+: ${openbgpd_enable=NO}
+
+check_process()
+{
+ /bin/pgrep -f 'bgpd: parent.*'
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/openbgpd6/files/patch-Makefile.am b/net/openbgpd6/files/patch-Makefile.am
new file mode 100644
index 000000000000..da85a8ad6103
--- /dev/null
+++ b/net/openbgpd6/files/patch-Makefile.am
@@ -0,0 +1,20 @@
+--- Makefile.am.orig 2019-05-01 11:22:14 UTC
++++ Makefile.am
+@@ -19,13 +19,14 @@
+ EXTRA_DIST = README.md VERSION bgpd.conf
+
+ install-data-hook:
+- @if [ ! -d "$(DESTDIR)$(localstatedir)/run" ]; then \
++ if [ ! -d "$(DESTDIR)$(localstatedir)/run" ]; then \
+ $(INSTALL) -m 755 -d "$(DESTDIR)$(localstatedir)/run"; \
+ fi
+- @if [ ! -d "$(DESTDIR)$(sysconfdir)" ]; then \
++ if [ ! -d "$(DESTDIR)$(sysconfdir)" ]; then \
+ $(INSTALL) -m 755 -d "$(DESTDIR)$(sysconfdir)"; \
+ fi
+- @if [ ! -f "$(DESTDIR)$(sysconfdir)/bgpd.conf" ]; then \
++ $(INSTALL) -m 644 "$(srcdir)/bgpd.conf" "$(DESTDIR)$(sysconfdir)/bgpd.conf.sample"; \
++ if [ ! -f "$(DESTDIR)$(sysconfdir)/bgpd.conf" ]; then \
+ $(INSTALL) -m 644 "$(srcdir)/bgpd.conf" "$(DESTDIR)$(sysconfdir)/bgpd.conf"; \
+ else \
+ echo; \
diff --git a/net/openbgpd6/files/pkg-message.in b/net/openbgpd6/files/pkg-message.in
new file mode 100644
index 000000000000..db9af6122ff0
--- /dev/null
+++ b/net/openbgpd6/files/pkg-message.in
@@ -0,0 +1,6 @@
+------------------------------------------------------------------
+OpenBGPD has been successfully installed.
+
+Configuration file must be created at %%PREFIX%%/etc/bgpd.conf
+and permission set to 0600.
+------------------------------------------------------------------