From 98b9c9cef11e65c11de530956849f0090ebd182a Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 30 Nov 2014 11:14:49 +0000 Subject: [PATCH] - Make NETWORKING depend on DNS/FIREWALL - Make local_unbound provide DNS - Make ipfs, ipfw, and pf provide FIREWALL - Make securelevel require FIREWALL - Remove ipfs/ipfilter requirement from netif to avoid circular dependency with those services --- etc/rc.d/Makefile | 32 ++++++++++++++++++++++++-------- etc/rc.d/NETWORKING | 2 +- etc/rc.d/ipfs | 2 +- etc/rc.d/ipfw | 3 ++- etc/rc.d/local_unbound | 3 +-- etc/rc.d/netif | 1 - etc/rc.d/pf | 2 +- etc/rc.d/securelevel | 2 +- 8 files changed, 31 insertions(+), 16 deletions(-) diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 54b88b73d524..194df199e655 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -40,11 +40,6 @@ FILES= DAEMON \ hostid_save \ hostname \ ${_inetd} \ - ipfilter \ - ipfs \ - ipfw \ - ipmon \ - ipnat \ ipsec \ ${_kadmind} \ ${_kdc} \ @@ -76,9 +71,6 @@ FILES= DAEMON \ nsswitch \ ${_opensm} \ ${_othermta} \ - pf \ - pflog \ - pfsync \ pwcheck \ quota \ random \ @@ -201,6 +193,17 @@ FILES+= rtsold FILES+= static_ndp .endif +.if ${MK_IPFILTER} != "no" +FILES+= ipfilter +FILES+= ipmon +FILES+= ipnat +FILES+= ipfs +.endif + +.if ${MK_IPFW} != "no" +FILES+= ipfw +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid @@ -242,6 +245,16 @@ FILES+= nfsd FILES+= nfsuserd .endif +.if ${MK_NIS} != "no" +FILES+= nisdomain +FILES+= ypbind +FILES+= yppasswdd +FILES+= ypserv +FILES+= ypset +FILES+= ypupdated +FILES+= ypxfrd +.endif + .if ${MK_NTP} != "no" FILES+= ntpd FILES+= ntpdate @@ -261,6 +274,9 @@ _sshd= sshd .if ${MK_PF} != "no" FILES+= ftp-proxy +FILES+= pf +FILES+= pflog +FILES+= pfsync .endif .if ${MK_PPP} != "no" diff --git a/etc/rc.d/NETWORKING b/etc/rc.d/NETWORKING index fbfedea51eaf..811b25bb1b50 100755 --- a/etc/rc.d/NETWORKING +++ b/etc/rc.d/NETWORKING @@ -4,7 +4,7 @@ # # PROVIDE: NETWORKING NETWORK -# REQUIRE: netif netoptions routing ipfw +# REQUIRE: netif netoptions routing DNS FIREWALL # REQUIRE: defaultroute resolv bridge # REQUIRE: static_arp diff --git a/etc/rc.d/ipfs b/etc/rc.d/ipfs index ac6d5c2a7a1e..3830dff96657 100755 --- a/etc/rc.d/ipfs +++ b/etc/rc.d/ipfs @@ -3,7 +3,7 @@ # $FreeBSD$ # -# PROVIDE: ipfs +# PROVIDE: ipfs FIREWALL # REQUIRE: ipnat # KEYWORD: nojail shutdown diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw index f56c848a78ef..789f1cc62c53 100755 --- a/etc/rc.d/ipfw +++ b/etc/rc.d/ipfw @@ -3,7 +3,8 @@ # $FreeBSD$ # -# PROVIDE: ipfw +# PROVIDE: ipfw FIREWALL +# REQUIRE: defaultroute # KEYWORD: nojailvnet . /etc/rc.subr diff --git a/etc/rc.d/local_unbound b/etc/rc.d/local_unbound index 6094ff557fd1..743a6c9df440 100755 --- a/etc/rc.d/local_unbound +++ b/etc/rc.d/local_unbound @@ -3,9 +3,8 @@ # $FreeBSD$ # -# PROVIDE: local_unbound +# PROVIDE: local_unbound DNS # REQUIRE: FILESYSTEMS netif resolv routing -# BEFORE: NETWORKING # KEYWORD: shutdown . /etc/rc.subr diff --git a/etc/rc.d/netif b/etc/rc.d/netif index 30660e4ae5c5..e628ea7ee016 100755 --- a/etc/rc.d/netif +++ b/etc/rc.d/netif @@ -27,7 +27,6 @@ # PROVIDE: netif # REQUIRE: FILESYSTEMS serial sysctl -# REQUIRE: ipfilter ipfs # KEYWORD: nojailvnet . /etc/rc.subr diff --git a/etc/rc.d/pf b/etc/rc.d/pf index 8dcc40d466eb..5e2f9dca1435 100755 --- a/etc/rc.d/pf +++ b/etc/rc.d/pf @@ -3,7 +3,7 @@ # $FreeBSD$ # -# PROVIDE: pf +# PROVIDE: pf FIREWALL # REQUIRE: FILESYSTEMS netif pflog pfsync # BEFORE: routing # KEYWORD: nojail diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel index 314f12ee0b48..98fcdff8cf29 100755 --- a/etc/rc.d/securelevel +++ b/etc/rc.d/securelevel @@ -4,7 +4,7 @@ # # PROVIDE: securelevel -# REQUIRE: adjkerntz ipfw ipfilter pf +# REQUIRE: adjkerntz FIREWALL . /etc/rc.subr