1#! /bin/sh
2
3. /etc/rc.common
4
5StartService ()
6{
7	#
8	# Unfortunately, Mac OS X's devfs is based on the old FreeBSD
9	# one, not the current one, so there's no way to configure it
10	# to create BPF devices with particular owners or groups.
11	# This startup item will make it owned by the admin group,
12	# with permissions rw-rw----, so that anybody in the admin
13	# group can use programs that capture or send raw packets.
14	#
15	# Change this as appropriate for your site, e.g. to make
16	# it owned by a particular user without changing the permissions,
17	# so only that user and the super-user can capture or send raw
18	# packets, or give it the permissions rw-r-----, so that
19	# only the super-user can send raw packets but anybody in the
20	# admin group can capture packets.
21	#
22	chgrp admin /dev/bpf*
23	chmod g+rw /dev/bpf*
24}
25
26StopService ()
27{
28	return 0;
29}
30
31RestartService () { StartService; }
32
33RunService "$1"
34