summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorrstone <rstone@FreeBSD.org>2015-03-01 00:58:23 +0000
committerrstone <rstone@FreeBSD.org>2015-03-01 00:58:23 +0000
commitd13e84a414466db05df8723644102d5605ebb87a (patch)
treebbfd8f097edb1705fd0222b16c3e6638a9838fee /etc/rc.d
parent6a58272d00fb0f1db8068cd37dcd7b8db62dd269 (diff)
downloadFreeBSD-src-d13e84a414466db05df8723644102d5605ebb87a.zip
FreeBSD-src-d13e84a414466db05df8723644102d5605ebb87a.tar.gz
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.
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/Makefile1
-rw-r--r--etc/rc.d/iovctl39
-rwxr-xr-xetc/rc.d/netif2
3 files changed, 41 insertions, 1 deletions
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index a1f879e..1e6e28f 100644
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -44,6 +44,7 @@ FILES= DAEMON \
hostid \
hostid_save \
hostname \
+ iovctl \
ip6addrctl \
ipfilter \
ipfs \
diff --git a/etc/rc.d/iovctl b/etc/rc.d/iovctl
new file mode 100644
index 0000000..f207b08
--- /dev/null
+++ b/etc/rc.d/iovctl
@@ -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"
diff --git a/etc/rc.d/netif b/etc/rc.d/netif
index 62ad31f..0915b28 100755
--- a/etc/rc.d/netif
+++ b/etc/rc.d/netif
@@ -26,7 +26,7 @@
#
# PROVIDE: netif
-# REQUIRE: atm1 FILESYSTEMS serial sppp sysctl
+# REQUIRE: atm1 FILESYSTEMS iovctl serial sppp sysctl
# REQUIRE: ipfilter ipfs
# KEYWORD: nojailvnet
OpenPOWER on IntegriCloud