Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / libpcap / ChmodBPF / ChmodBPF
blobee3712184535fe1b7f6791d1f6115b18b75eab9f
1 #! /bin/sh
3 . /etc/rc.common
5 StartService ()
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.
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.
22 chgrp admin /dev/bpf*
23 chmod g+rw /dev/bpf*
26 StopService ()
28 return 0;
31 RestartService () { StartService; }
33 RunService "$1"