| sysadmn
|
1
|
 |
|
11-06-2003 03:59 PM ET (US)
|
|
Well, the 'unixy' way is to set the permissions in a startup script. Don't have access to a Mac (yet :0), but on Linux/Solaris, there are a set of directories (/etc/rc[123456].d or /etc/init/rc[123456].d). Each script beginning with "S" is executed as root in numerical order when the corresponding kernel run-level is entered. Typically the scripts are symlinks to a script in the init directory (typically /etc/init.d). If similar directories exist on OSX (may or may not, since BSD used to use monolithic files...), create a startup script to set the permissions you want. Step by step: 1) In /etc/init.d, create the file 'SetBPFPerms'. Here is a skeleton: -------8< Cut Here 8<-------- #!/sbin/sh #
case "$1" in 'start') #Place commands to set perms here ;;
'stop') # Place commands to be executed on shutdown here ;;
*) echo "Usage: $0 { start | stop }" exit 1 ;; esac exit 0 -------8< Cut Here 8<-------- 2) Edit the file to set the permissions as necessary. 3) Assuming you want the permissions set entering run-level two, create symlinks from the proper directories to this file. On Solaris, the commands (as root) would be ln -s /etc/init.d/InitBPFPerms /etc/rc2.d/S99InitBPFPerms ln -s /etc/init.d/InitBPFPerms /etc/rc2.d/K99InitBPFPerms
|