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

Garrett Cooper gcooper at FreeBSD.org
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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 03 16:19:38 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9-CURRENT
>Organization:
Cisco Systems, Inc.
>Environment:
>Description:
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.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 206130)
+++ Makefile	(working copy)
@@ -2,54 +2,157 @@
 
 .include <bsd.own.mk>
 
+#
+# 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.
+#
 FILES=	DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \
-	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
 .endif
 
+.if ${MK_AMD} != "no"
+FILES+= amd
+.endif
+
+.if ${MK_APM} != "no"
+FILES+= apm apmd
+.endif
+
+.if ${MK_ATM} != "no"
+FILES+= atm2 atm3
+.endif
+
+.if ${MK_AUDIT} != "no"
+FILES+= auditd
+.endif
+
+.if ${MK_BLUETOOTH} != "no"
+FILES+= bluetooth bthidd hcsecd rfcomm_pppd_server sdpd
+.endif
+
+.if ${MK_BSNMP} != "no"
+FILES+= bsnmpd
+.endif
+
+.if ${MK_INET6_SUPPORT} != "no"
+FILES+= ip6addrctl
+.endif
+
+.if ${MK_IPFILTER} != "no"
+FILES+= ipfilter ipfs ipmon ipnat
+.endif
+
+.if ${MK_IPFW} != "no"
+FILES+= ipfw ipmon
+.endif
+
+.if ${MK_KERBEROS} != "no"
+FILES+= kadmind kerberos kpasswdd
+.endif
+
+.if ${MK_NIS} != "no"
+FILES+= nisdomain nsswitch yppasswdd ypupdated ypxfrd
+.endif
+
 .if ${MK_NS_CACHING} != "no"
 FILES+= nscd
 .endif
 
+.if ${MK_NTP} != "no"
+FILES+= ntpd ntpdate
+.endif
+
+.if ${MK_OPENSSH} != "no"
+FILES+=	sshd
+.endif
+
+.if ${MK_PF} != "no"
+FILES+= pf pflog pfsync
+.endif
+
+.if ${MK_PPP} != "no"
+FILES+= pppoed sppp
+.endif
+
+.if ${MK_RCMDS} != "no"
+FILES+= rwho
+.endif
+
+.if ${MK_ROUTED} != "no"
+FILES+= mrouted routed
+
+.if ${MK_INET6} != "no"
+FILES+= mroute6d route6d rtadvd rtsold
+.endif
+.if ${MK_IPX} != "no"
+FILES+= ipxrouted
+.endif
+.endif
+
+.if ${MK_SENDMAIL} != "no"
+FILES+= sendmail
+.endif
+
+.if ${MK_WIRELESS} != "no"
+FILES+= hostapd wpa_supplicant
+.endif
+
+.if ${MK_ZFS} != "no"
+FILES+= zfs zvol
+.endif
+
 FILESDIR=	/etc/rc.d
 FILESMODE=	${BINMODE}
 


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list