aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-08-10 15:04:04 +0100
committerLexi Winter <ivy@FreeBSD.org>2025-08-10 15:09:21 +0100
commitb6e89dc49c1bbbc98af08bb16e4afa558a320484 (patch)
tree52ba1fd281a1113ec03ae08cfb071fb47a1209d0
parent3738005fae09451b411e8f47f124d9fc94da4238 (diff)
rc: Add /etc/defaults/rc.conf.d/routedlf/dev/rc.conf.d
-rw-r--r--libexec/rc/Makefile2
-rw-r--r--libexec/rc/rc.conf3
-rw-r--r--libexec/rc/rc.conf.d/Makefile17
-rw-r--r--libexec/rc/rc.conf.d/routed6
4 files changed, 24 insertions, 4 deletions
diff --git a/libexec/rc/Makefile b/libexec/rc/Makefile
index e82b582462d0..89eb4bd49b96 100644
--- a/libexec/rc/Makefile
+++ b/libexec/rc/Makefile
@@ -23,7 +23,7 @@ LIBEXEC_SCRIPTSDIR= /libexec
LIBEXEC_SCRIPTSMODE= 755
LIBEXEC_SCRIPTSPACKAGE= rc
-SUBDIR+= rc.d
+SUBDIR+= rc.d rc.conf.d
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 07cb9803882c..9c5adf14d787 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -457,9 +457,6 @@ static_arp_pairs="" # Set to static ARP list (or leave empty).
static_ndp_pairs="" # Set to static NDP list (or leave empty).
static_routes="" # Set to static route list (or leave empty).
gateway_enable="NO" # Set to YES if this host will be a gateway.
-routed_enable="NO" # Set to YES to enable a routing daemon.
-routed_program="/sbin/routed" # Name of routing daemon to use if enabled.
-routed_flags="-q" # Flags for routing daemon.
arpproxy_all="NO" # replaces obsolete kernel option ARP_PROXYALL.
forward_sourceroute="NO" # do source routing (only if gateway_enable is set to "YES")
accept_sourceroute="NO" # accept source routed packets to us
diff --git a/libexec/rc/rc.conf.d/Makefile b/libexec/rc/rc.conf.d/Makefile
new file mode 100644
index 000000000000..f99cbe632b44
--- /dev/null
+++ b/libexec/rc/rc.conf.d/Makefile
@@ -0,0 +1,17 @@
+# Copyright (c) 2025 Lexi Winter.
+#
+# SPDX-License-Identifier: BSD-2-Clause OR ISC
+
+.include <src.opts.mk>
+
+FILEGROUPS=
+FILESDIR= /etc/rc.conf.d
+
+.if ${MK_ROUTED} != "no"
+FILESGROUPS+= ROUTED
+ROUTED+= routed
+ROUTEDDIR= ${FILESDIR}
+ROUTEDPACKAGE= rip
+.endif
+
+.include <bsd.prog.mk>
diff --git a/libexec/rc/rc.conf.d/routed b/libexec/rc/rc.conf.d/routed
new file mode 100644
index 000000000000..9a1a3c26ccb1
--- /dev/null
+++ b/libexec/rc/rc.conf.d/routed
@@ -0,0 +1,6 @@
+# Default configuration for routed(8). Do not edit this file; either copy
+# it to /etc/rc.conf.d and modify it there, or add overrides in /etc/rc.conf.
+
+routed_enable="NO" # Set to YES to enable a routing daemon.
+routed_program="/sbin/routed" # Name of routing daemon to use if enabled.
+routed_flags="-q" # Flags for routing daemon.