diff --git a/libexec/rc/Makefile b/libexec/rc/Makefile --- a/libexec/rc/Makefile +++ b/libexec/rc/Makefile @@ -23,7 +23,7 @@ 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 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -457,9 +457,6 @@ 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 --- /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 + +FILESGROUPS= +FILESDIR= /etc/defaults/rc.conf.d + +.if ${MK_ROUTED} != "no" +FILESGROUPS+= ROUTED +ROUTED+= routed +ROUTEDDIR= ${FILESDIR} +ROUTEDPACKAGE= rip +.endif + +.include diff --git a/libexec/rc/rc.conf.d/routed b/libexec/rc/rc.conf.d/routed new file mode 100644 --- /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. diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -10226,6 +10226,7 @@ .if ${MK_ROUTED} == no OLD_FILES+=etc/rc.d/routed +OLD_FILES+=etc/defaults/rc.conf.d/routed OLD_FILES+=rescue/routed OLD_FILES+=rescue/rtquery OLD_FILES+=sbin/routed