conf/145344: [patch] Fix kitchen sink approach for rc.d scripts installation

Garrett Cooper gcooper at
Sat Apr 3 16:19:38 UTC 2010

>Number:         145344
>Category:       conf
>Synopsis:       [patch] Fix kitchen sink approach for rc.d scripts installation
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 03 16:19:38 UTC 2010
>Originator:     Garrett Cooper
>Release:        9-CURRENT
Cisco Systems, Inc.
In .../src/etc/rc.d/Makefile, all of the configuration files noted today are currently done in a kitchen sink manner, s.t. all folks building systems from scratch are actually installing potentially a lot more rc.d run scripts than needed; allowing the user to tune their src.conf definition, etc to conditionally exclude these scripts potentially saves a small amount of space, but more importantly saves a little bit of unnecessary processing time at bootup as rcorder parses and sorts these rc.d scripts twice to determine execution ordering on standard systems, as well as tones down unnecessary noise with certain build situations where when WITHOUT_INET6 is specified (for instance) it spews out a lot of noise about ip6addrctl not being present and about unsupported inet6 arguments being passed to routed.

This script did the right thing with my initial set of tests run, but it needs to be run through a full install -> execute test phase. Will email once that's complete.


Patch attached with submission follows:

Index: Makefile
--- Makefile	(revision 206130)
+++ Makefile	(working copy)
@@ -2,54 +2,157 @@
 .include <>
+# XXX (gcooper):
+# 1. Resolve the following reverse dependency issues, so this list can be
+#    cleaned up so that the rc.d files are conditionally included further:
+# NETWORKING -> ipfw (IPFW) faith (INET6?) ppp (PPP) stf (INET6)
+# amd -> ypset (NIS)
+# ipfw -> ppp (PPP)
+# keyserv -> ypset (NIS)
+# mountd -> quota (QUOTA)
+# netif -> atm1 (ATM)
+# routing -> ppp (PPP)
+# 2. There appears to be some kind of implicit dependency between bluetooth
+#    (rfcomm_pppd_server and sdpd) and ppp(8). This needs to be properly
+#    hashed out and made apparent in the rc.d scripts. Please see the Bluetooth
+#    section of the handbook for more details about the bluetooth
+#    implementation on FreeBSD.
+# See relevant REQUIRES lines for more details about dependencies of
+# aforementioned scripts.
-	abi accounting addswap adjkerntz amd \
-	apm apmd archdep atm1 atm2 atm3 auditd \
-	bgfsck bluetooth bootparams bridge bsnmpd bthidd \
+	abi addswap adjkerntz archdep atm1 \
+	bgfsck bootparams bridge \
 	ccd cleanvar cleartmp cron \
 	ddb defaultroute devd devfs dhclient \
 	dmesg dumpon \
 	encswap \
 	faith fsck ftp-proxy ftpd \
 	gbde geli geli2 gssd \
-	hastd hcsecd \
-	hostapd hostid hostid_save hostname \
-	inetd initrandom \
-	ip6addrctl ipfilter ipfs ipfw ipmon \
-	ipnat ipsec ipxrouted \
+	hastd hostid hostid_save hostname \
+	inetd initrandom ipsec \
 	jail \
-	kadmind kerberos keyserv kldxref kpasswdd \
+	keyserv kldxref \
 	ldconfig local localpkg lockd lpd \
 	mixer motd mountcritlocal mountcritremote mountlate \
-	mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \
+	mdconfig mdconfig2 mountd moused msgs \
 	named natd netif netoptions \
 	newsyslog nfsclient nfscbd nfsd \
-	nfsserver nfsuserd nisdomain nsswitch ntpd ntpdate \
+	nfsserver nfsuserd \
 	othermta \
-	pf pflog pfsync \
-	powerd power_profile ppp pppoed pwcheck \
+	powerd power_profile ppp pwcheck \
 	quota \
-	random rarpd resolv rfcomm_pppd_server root \
-	route6d routed routing rpcbind rtadvd rtsold rwho \
-	savecore sdpd securelevel sendmail \
-	serial sppp statd static_arp stf swap1 \
+	random rarpd resolv root \
+	routing rpcbind rtsold \
+	savecore securelevel \
+	serial statd static_arp stf swap1 \
 	syscons sysctl syslogd \
 	timed tmp \
 	ugidfw \
 	var virecover \
-	watchdogd wpa_supplicant \
-	ypbind yppasswdd ypserv \
-	ypset ypupdated ypxfrd \
-	zfs zvol
+	watchdogd \
+	ypbind ypserv ypset
-.if ${MK_OPENSSH} != "no"
-FILES+=	sshd
+.if ${MK_ACCT} != "no"
+FILES+= accounting
+.if ${MK_AMD} != "no"
+FILES+= amd
+.if ${MK_APM} != "no"
+FILES+= apm apmd
+.if ${MK_ATM} != "no"
+FILES+= atm2 atm3
+.if ${MK_AUDIT} != "no"
+FILES+= auditd
+.if ${MK_BLUETOOTH} != "no"
+FILES+= bluetooth bthidd hcsecd rfcomm_pppd_server sdpd
+.if ${MK_BSNMP} != "no"
+FILES+= bsnmpd
+.if ${MK_INET6_SUPPORT} != "no"
+FILES+= ip6addrctl
+.if ${MK_IPFILTER} != "no"
+FILES+= ipfilter ipfs ipmon ipnat
+.if ${MK_IPFW} != "no"
+FILES+= ipfw ipmon
+.if ${MK_KERBEROS} != "no"
+FILES+= kadmind kerberos kpasswdd
+.if ${MK_NIS} != "no"
+FILES+= nisdomain nsswitch yppasswdd ypupdated ypxfrd
 .if ${MK_NS_CACHING} != "no"
 FILES+= nscd
+.if ${MK_NTP} != "no"
+FILES+= ntpd ntpdate
+.if ${MK_OPENSSH} != "no"
+FILES+=	sshd
+.if ${MK_PF} != "no"
+FILES+= pf pflog pfsync
+.if ${MK_PPP} != "no"
+FILES+= pppoed sppp
+.if ${MK_RCMDS} != "no"
+FILES+= rwho
+.if ${MK_ROUTED} != "no"
+FILES+= mrouted routed
+.if ${MK_INET6} != "no"
+FILES+= mroute6d route6d rtadvd rtsold
+.if ${MK_IPX} != "no"
+FILES+= ipxrouted
+.if ${MK_SENDMAIL} != "no"
+FILES+= sendmail
+.if ${MK_WIRELESS} != "no"
+FILES+= hostapd wpa_supplicant
+.if ${MK_ZFS} != "no"
+FILES+= zfs zvol
 FILESDIR=	/etc/rc.d


More information about the freebsd-bugs mailing list