In message <20190323.125853.93885646440204179....@allbsd.org>, Hiroki Sato writ es: > ----Security_Multipart(Sat_Mar_23_12_58_53_2019_110)-- > Content-Type: Text/Plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > > Cy Schubert <c...@freebsd.org> wrote > in <201903220130.x2m1uq0p042...@repo.freebsd.org>: > > cy> Author: cy > cy> Date: Fri Mar 22 01:30:51 2019 > cy> New Revision: 345400 > cy> URL: https://svnweb.freebsd.org/changeset/base/345400 > cy> > cy> Log: > cy> Add rc.d support for ippool(8). > cy> > cy> I've been using ippool at my site for approximately two years. It's > cy> about time this was committed. > cy> > cy> PR: 218433 > cy> MFC after: 2 weeks > > cy> Added: head/libexec/rc/rc.d/ippool > cy> ========================================================================= > ===== > cy> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > cy> +++ head/libexec/rc/rc.d/ippool Fri Mar 22 01:30:51 2019 (r34540 > 0) > cy> @@ -0,0 +1,40 @@ > cy> +#!/bin/sh > cy> +# > cy> +# $FreeBSD$ > cy> +# > cy> + > cy> +# PROVIDE: ippool > cy> +# REQUIRE: FILESYSTEMS > cy> +# BEFORE: ipfilter > cy> +# KEYWORD: nojail > cy> + > cy> +. /etc/rc.subr > cy> + > cy> +name="ippool" > cy> +desc="user interface to the IPFilter pools" > cy> +rcvar="ippool_enable" > cy> +load_rc_config $name > cy> +start_cmd="ippool_start" > cy> +stop_cmd="${ippool_program} -F" > cy> +reload_cmd="ippool_reload" > cy> +extra_commands="reload" > cy> +required_files="${ippool_rules}" > cy> +required_modules="ipl:ipfilter" > cy> + > cy> +ippool_start() > cy> +{ > cy> + if [ -r "${ippool_rules}" ]; then > cy> + echo "Loading IP Pools." > cy> + ${ippool_program} -f ${ippool_rules} ${ippool_flags} > cy> + fi > > This conditional is redundant. $required_files will check > readability of $ippool_rules. > > And if you want to add a flag, use of precmd is the right way like > the following: > > ---- > start_precmd="ippool_start_precmd" > > ippool_start_precmd() > { > rc_flags="-f ${ippool_rules} ${rc_flags}" > } > ----
Thanks for this. Fixed. -- Cheers, Cy Schubert <cy.schub...@cschubert.com> FreeBSD UNIX: <c...@freebsd.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"