network outage today

AT&T Broadband’s connection to the house went down today a little after 1 PM. I called their tech support line and learned the earliest they could send a tech was June 17, 9 days later.

And they wonder why I don’t want AT&T to handle my local phone service?

As it turns out, service was restored about 2 hours later. I unplugged the “modem” and let it sit, then powered it back up a couple of times: finally, after I had rigged the airport base station to handle calling out and routing LAN traffic, the status lights indicated service was restored. Sure enough . . . .

look in the mirror

The Seattle Times: Local News: Suit filed over 2 girls killed by train

Families of two girls killed by a train in Kent are suing the city and two railroad companies for not doing more to keep children off the tracks.

As harsh as it sounds to scold grieving parents, why don’t the parents of the girls killed in this tragic accident comprehend their own role in this? Imagine the plight of the train’s engineer, knowing that the two girls in front of his train are going to be struck with severe consequences: should he have to live with that? If I were the railway, I would be considering a countersuit for loss of use of the tracks and equipment during the accident investigation.

The suit claims damages for the loss of the “parent-child relationship” and I have to ask what there was of that to be damaged?

My 3 and 5 year old will point out bicyclists without helmets, people walking on railroad tracks, joggers in the street, all things they have been told are unsafe: seems to me they could teach a lesson or two.

Darwin wishlist

Or perhaps I should call it the missing bits.

  • no file retrieval software tools (curl or wget) are installed in Darwin. So bootstrapping fink or other improvements are pretty hard to do.
  • console logging seems to be missing. In OS X you can use ConsoleMessage to write to the Console application’s log: there is no such animal in an aqua-less environment. System.log does not pick up the slack.
  • the /Library/StartupItems directory is not created at installation time. OS 9 created folders without contents, why shouldn’t the newer OSes, especially if they’re supposed to be used?
  • it’s not clear that StartupItems are handled the same as on OS X: I know startup scripts that don’t reference trigger values in /etc/hostconfig will never start and I think OS X is more flexible, but I haven’t tested it lately. The hostconfig file is mentioned twice in the overview to OS X and this dependency/requirement is never mentioned.
  • Console logging seems to have ended up on the cutting room floor: the function ConsoleMessage in /etc/rc.common will dump into /private/var/tmp/console.log on OS X, but there’s no such place in Darwin. I added some stuff to rc.common to address this, but I’m sure someone at Apple or OpenDarwin could come up with something better.

My suspicion is that Apple may have cut too deep when they split Darwin off from OS X and took off a little too much.

I have read through “Inside Mac OS X: System Overview” and as an overview, it’s great, but as a guide to implementation, it’s not as valuable. It’s a little too non-commital on what may be supported in future: that suggests to me that given the choice of following the spec or copying what’s known to work, you go with what works and let the spec catch up.
Continue reading “Darwin wishlist”

new SNMP starter stuff

StartupItems bundles:

Use this one for fink-managed SNMP builds and this one if you’re using darwinports.

This version checks for the existence of the config file and exits with a helpful message if it isn’t there.

It also logs the process ID in /private/var/run/snmpd.pid.

You can put this in /System/Library/StartupItems or /Library/StartupItems: don’t forget to add SNMP=-YES- to /etc/hostconfig.

(as root or sudo -s) cat >> /etc/hostconfig
SNMP=-YES-
[Ctrl-D]

Darwin startup stuff [con’t]

There is some debate about how this is supposed to work. I have, I think, confirmed that having the startup executable verify that it is supposed to run in /etc/hostconfig is what’s supposed to happen.

But now I’m hearing that there are two StartupItems directories: /System/Library/StartupItems, reserved for factory-installed stuff, and /Library/StartupItems for site-specific stuff (why not /Local/Library/StartupItems?).

Darwin machines only have the first directory. I gather most people are running the full OS X installation.

It seems to me Apple needs some help sorting all this out: I need a job of some kind. Hmm, perhaps some of the Apple employees who keep dropping by could look over my resume (down on your right).

<another clarification from Creed Erickson on the missing /Library/StartupItems directory>

Create it.

Well, if I am going to create it, I would just as soon call it /Local/Library/StartupItems.

This could be documented a little better, as could the stuff about /etc/hostconfig, without which none of the rest of this matters.

someone has built what I asked for

TeleZapper Home Page

How does the TeleZapper “zap” telemarketers?

The TeleZapper uses the technology of telemarketers’ automatic dialing equipment against them. When you or your answering machine picks up a call, the TeleZapper emits a special tone that “fools” the computer into thinking your number is disconnected. Instead of connecting you to a salesperson, the computer stores your number as diconnected in it’s database. Over time, as your number is removed from more and more databases, you’ll see a dramatic decrease in the number of annoying telemarketing calls you receive.

Perfect: invisible but effective. Where’s my credit card?

Thanks to Steve for the tip.

new bike

I traded in my old (bought in September) used bike for a newer and much better one. I should have gone to RecycledCycles first.

The new one is a Schwinn Mirada, essentially a mountain bike. It feels much safer to ride, less twitchy. I have so far taken three short rides on it and each time, I’ve been tempted to just keep on going. It just feels like fun.

starting services at boot time on Darwin

I needed to get snmpd to start up at boot time on a Darwin box, so I had to delve into Apple’s way of handling rc/init scripts.

All the stuff lives in /System/Library/StartupItems with a directory for each service.
[/System/Library/StartupItems]:: ls -F
Accounting/ Cleanup/ IPServices/ SSH/
Apache/ ConfigServer/ NFS/ SecurityServer/
AppServices/ CrashReporter/ Network/ Sendmail/
AppleShare/ Cron/ NetworkTime/ SystemLog/
AppleTalk/ DirectoryServices/ Portmap/ SystemTuning/
AuthServer/ Disks/ SNMP/

So I copied the SSH directory and made some changes to its contents (three files, all contained in the linked archive below).

SNMP.tgz

[/System/Library/StartupItems]:: ls -FR SNMP
Resources/ SNMP* StartupParameters.plist

SNMP/Resources:
English.lproj/

SNMP/Resources/English.lproj:
Localizable.strings

As you can see, SNMP is the executable script, Resources is a directory with another inside it, and the other is a text file. The text files just need to be modified to reflect what they’re associated with (in this case, the snmp daemon).

You then add a line to /etc/hostconfig that the startup script will look for:

SNMP=-YES-

This was patterned after the existing startup stuff.

I have tested it and it works just fine. I’m glad it was that easy. You can see the results here.

There are some more, um, informed docs on this here.

<addendum, June 7 >

Well, I may have oversimplified this: it seems there is more than one place for StartupItems, and I of course chose the wrong one.

Creed Erickson of Apple’s Software Engineering Operations team sent this to the open-darwin discussion list:

Locally supplied startup items–as opposed to Apple supplied items–should be in /Library/StartupItems rather than in /System/Library/StartupItems.

However, it’s not clear how to handle that on a pure Darwin system, ie w/o Aqua and therefore not OS X: there is no /Library/StartupItems. Am I supposed to create it?