From owner-svn-src-all@freebsd.org Fri Apr 5 01:22:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 923F51564398; Fri, 5 Apr 2019 01:22:31 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 342B86F503; Fri, 5 Apr 2019 01:22:31 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F67B5F57; Fri, 5 Apr 2019 01:22:31 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x351MU0E088526; Fri, 5 Apr 2019 01:22:30 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x351MUD2088523; Fri, 5 Apr 2019 01:22:30 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201904050122.x351MUD2088523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 5 Apr 2019 01:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345899 - in stable/12: libexec/rc libexec/rc/rc.d tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable/12: libexec/rc libexec/rc/rc.d tools/build/mk X-SVN-Commit-Revision: 345899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 342B86F503 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 01:22:31 -0000 Author: cy Date: Fri Apr 5 01:22:30 2019 New Revision: 345899 URL: https://svnweb.freebsd.org/changeset/base/345899 Log: MFC r345400-345401,345403,345412,345437: Add rc.d support for ippool(8). I've been using ippool at my site for approximately two years. It's about time this was committed. PR: 218433 Added: stable/12/libexec/rc/rc.d/ippool - copied, changed from r345400, head/libexec/rc/rc.d/ippool Modified: stable/12/libexec/rc/rc.conf stable/12/libexec/rc/rc.d/Makefile stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.conf ============================================================================== --- stable/12/libexec/rc/rc.conf Thu Apr 4 23:40:30 2019 (r345898) +++ stable/12/libexec/rc/rc.conf Fri Apr 5 01:22:30 2019 (r345899) @@ -196,6 +196,10 @@ ipfilter_program="/sbin/ipf" # where the ipfilter prog ipfilter_rules="/etc/ipf.rules" # rules definition file for ipfilter, see # /usr/src/contrib/ipfilter/rules for examples ipfilter_flags="" # additional flags for ipfilter +ippool_enable="NO" # Set to YES to enable ip filter pools +ippool_program="/sbin/ippool" # where the ippool program lives +ippool_rules="/etc/ippool.tables" # rules definition file for ippool +ippool_flags="" # additional flags for ippool ipnat_enable="NO" # Set to YES to enable ipnat functionality ipnat_program="/sbin/ipnat" # where the ipnat program lives ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat Modified: stable/12/libexec/rc/rc.d/Makefile ============================================================================== --- stable/12/libexec/rc/rc.d/Makefile Thu Apr 4 23:40:30 2019 (r345898) +++ stable/12/libexec/rc/rc.d/Makefile Fri Apr 5 01:22:30 2019 (r345899) @@ -215,7 +215,8 @@ CONFS+= inetd CONFS+= ipfilter \ ipfs \ ipmon \ - ipnat + ipnat \ + ippool .endif .if ${MK_IPFW} != "no" Copied and modified: stable/12/libexec/rc/rc.d/ippool (from r345400, head/libexec/rc/rc.d/ippool) ============================================================================== --- head/libexec/rc/rc.d/ippool Fri Mar 22 01:30:51 2019 (r345400, copy source) +++ stable/12/libexec/rc/rc.d/ippool Fri Apr 5 01:22:30 2019 (r345899) @@ -14,26 +14,23 @@ name="ippool" desc="user interface to the IPFilter pools" rcvar="ippool_enable" load_rc_config $name -start_cmd="ippool_start" +start_precmd="ippool_start_precmd" stop_cmd="${ippool_program} -F" reload_cmd="ippool_reload" extra_commands="reload" required_files="${ippool_rules}" required_modules="ipl:ipfilter" -ippool_start() +ippool_start_precmd() { - if [ -r "${ippool_rules}" ]; then - echo "Loading IP Pools." - ${ippool_program} -f ${ippool_rules} ${ippool_flags} - fi + rc_flags="-f ${ippool_rules} ${rc_flags}" } ippool_reload() { echo "Reloading IP Pools." - ${ippool_program} -F - ippool_start + ${stop_cmd} + ${start_cmd} } Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Thu Apr 4 23:40:30 2019 (r345898) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Fri Apr 5 01:22:30 2019 (r345899) @@ -3128,6 +3128,7 @@ OLD_FILES+=etc/rc.d/ipfilter OLD_FILES+=etc/rc.d/ipfs OLD_FILES+=etc/rc.d/ipmon OLD_FILES+=etc/rc.d/ipnat +OLD_FILES+=etc/rc.d/ippool OLD_FILES+=rescue/ipf OLD_FILES+=sbin/ipf OLD_FILES+=sbin/ipfs