Wireshark-dev: Re: [Wireshark-dev] ChmodBPF problem - Fixed!
From: Aaron Outhier <garlicsalt2@xxxxxxxxx>
Date: Fri, 12 Jun 2009 13:31:36 -0700
I had copied the folder to the the StartupItems folder, and after noticing no devices show up in WireShark, I went to the Terminal and cd'd to the /Library/StartupItems folder, and executed the file manually, and noticed that no change was made to the /dev/bpf device files. It is at this point, that I tweaked the script. After receiving these emails, I ran WireShark again, and noticed that the script doesn't execute on startup.

Coming from a Windows background, I kind of assumed that StartupItems folder was kind of like the Startup folder in the Start Menu of Windows 9x and above. Apparently, I assumed too much. I will try changing the script back, and executing the steps mentioned by Mr. Harris.

On Jun 12, 2009, at 11:16 AM, Guy Harris wrote:


On Jun 12, 2009, at 8:40 AM, Gerald Combs wrote:

According to System Startup Programming Topics
(http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html )
RunService should be used. It's defined in /etc/rc.common, which is
included at the top of the script.

Does your system have /etc/rc.common, and does it define RunService?

...and are you trying to run the script directly from the command line, or did you install it as a startup item and then either manually change the permissions of the BPF devices or do "sudo SystemStarter start ChmodBPF"? (You have to do the latter because merely installing a startup item doesn't provoke it to be run; when you next reboot, it'll be run automatically at startup time.)

ChmodBPF is *NOT* intended to be run from the command line; it's intended to be run as a startup item, as per the document Gerald cited.