From owner-svn-src-head@FreeBSD.ORG Sun Mar 1 00:58:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 234C8D1A; Sun, 1 Mar 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D8E937E; Sun, 1 Mar 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t210wOlp000980; Sun, 1 Mar 2015 00:58:24 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t210wNVj000967; Sun, 1 Mar 2015 00:58:23 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201503010058.t210wNVj000967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sun, 1 Mar 2015 00:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279463 - in head: etc/defaults etc/rc.d share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 00:58:25 -0000 Author: rstone Date: Sun Mar 1 00:58:23 2015 New Revision: 279463 URL: https://svnweb.freebsd.org/changeset/base/279463 Log: Add an rc.d script to invoke iovctl(8) during boot Differential Revision: https://reviews.freebsd.org/D88 Reviewed by: wblock, emaste, allanjude MFC after: 1 month Relnotes: yes Sponsored by: Sandvine Inc. Added: head/etc/rc.d/iovctl (contents, props changed) Modified: head/etc/defaults/rc.conf head/etc/rc.d/Makefile head/etc/rc.d/netif head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun Mar 1 00:57:01 2015 (r279462) +++ head/etc/defaults/rc.conf Sun Mar 1 00:58:23 2015 (r279463) @@ -667,6 +667,8 @@ casperd_enable="YES" # casperd(8) daemon rctl_enable="NO" # Load rctl(8) rules on boot rctl_rules="/etc/rctl.conf" # rctl(8) ruleset. See rctl.conf(5). +iovctl_files="" # Config files for iovctl(8) + ############################################################## ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sun Mar 1 00:57:01 2015 (r279462) +++ head/etc/rc.d/Makefile Sun Mar 1 00:58:23 2015 (r279463) @@ -44,6 +44,7 @@ FILES= DAEMON \ hostid \ hostid_save \ hostname \ + iovctl \ ip6addrctl \ ipfilter \ ipfs \ Added: head/etc/rc.d/iovctl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/iovctl Sun Mar 1 00:58:23 2015 (r279463) @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: iovctl +# REQUIRE: FILESYSTEMS sysctl + +. /etc/rc.subr + +name="iovctl" +command="/usr/sbin/iovctl" +start_cmd="iovctl_start" +stop_cmd="iovctl_stop" + +run_iovctl() +{ + local _f flag + + flag=$1 + for _f in ${iovctl_files} ; do + if [ -r ${_f} ]; then + ${command} ${flag} -f ${_f} > /dev/null + fi + done +} + +iovctl_start() +{ + run_iovctl -E +} + +iovctl_stop() +{ + run_iovctl -D +} + +load_rc_config $name +run_rc_command "$1" Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Sun Mar 1 00:57:01 2015 (r279462) +++ head/etc/rc.d/netif Sun Mar 1 00:58:23 2015 (r279463) @@ -26,7 +26,7 @@ # # PROVIDE: netif -# REQUIRE: atm1 FILESYSTEMS serial sppp sysctl +# REQUIRE: atm1 FILESYSTEMS iovctl serial sppp sysctl # REQUIRE: ipfilter ipfs # KEYWORD: nojailvnet Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Mar 1 00:57:01 2015 (r279462) +++ head/share/man/man5/rc.conf.5 Sun Mar 1 00:58:23 2015 (r279463) @@ -4447,6 +4447,11 @@ This variables contains the .Xr rctl.conf 5 ruleset to load for .Xr rctl 8 . +.It Va iovctl_files +.Pq Vt str +A space-separated list of configuration files used by +.Xr iovctl 8 . +The default value is an empty string. .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact @@ -4500,6 +4505,7 @@ ruleset to load for .Xr hcsecd 8 , .Xr ifconfig 8 , .Xr inetd 8 , +.Xr iovctl 8 , .Xr ipf 8 , .Xr ipfw 8 , .Xr ipnat 8 ,