Someone asked me if I had done this and could pass along any insights: I haven’t but I see that doing it might get rid of a problem. I find the response time on interactions to be quite sluggish (it’s a 233 with 64 Mb RAM: I can’t expect much). So I’ll see how this goes.
Continue reading “mod_perl and MovableType 2.0”
Category: it could be called work
more Darwin != OS X
The Fink tools, which up to now have worked flawlessly, choked on installing python, since the port has some dependencies on OS X toolbox calls.
Jeff Whittaker, <jsw at cdc.noaa.gov>, the maintainer, helped remove the offending lines. It might make sense for Fink and other ports/packaging tools to make note of where they’re being used before patching and installing.
I next need to either make sure the USB support lets me use a 3 button mouse or hack the X config to work with a one-button mouse and some additional keypresses.
I’m building the KDE 3.0.1 port right now: 82 packages are being installed to resolve dependencies. Hope I have enough disk space. The machine will probably be chewing on that for 2 days.
I suppose a diff would be helpful. I may do that.
is Darwin ready?
I rebooted my Darwin test machine to see if stuff generated by the ConsoleMessage function ever got logged: there are some assertions that it does.
Well, the machine once again dropped into single-user mode and I have no idea how to get networking to work. SystemStarter is supposedly the magic wand but I’ve waved it aplenty as well as rebooted again. No joy at all. There is no en0 device to configure so networking just never happens.
It’s not as bad a disaster as the last time this happened: at least this time, I have my filesystems and user info. Still, it’s all but useless.
I have googled around and asked on the OpenDarwin list: no luck so far on a resolution.
Update: I removed the modifications I made to /etc/rc.common and everything works now.
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 . . . .
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.
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).
[/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?
good news
Congratulations! You have been accepted to be a Google Answers
Researcher. We look forward to your joining the team.
I passed the audition.
snakebitten
My efforts to learn more about Darwin, the open source underpinnings of OS X, are not being rewarded.
Continue reading “snakebitten”