Basecamp

05401, 05403, 05446, 05462, 05482, 05673, 05701, 37signals, aardman animations, ac propulsion, adium, ads, aim, airport, al franken, apple, applescript, article id, asterisk, at&t, atom, automobile, away message, backpack, badge, basecamp, bash, bernie sanders, bicycling, billboard, blacklisting, blog, blogroll, blogzot, bluetooth, blunt, book, bot-net, brad bird, btv, bug, build, bungie, bunny, burlington, camping, can-spam, cars, centralized, channel camp, classic, classic mac workshop, cms, collection, color classic, comedy, comedy central, concert, conversion, cookbook, corrosion, crashing, creature comforts, criticism, daring fireball, darwin, dashboard, dcl, derbi, design, development, digg, dilemma, discussion, disney, download, drivers, dynetk, e-mail, e3, easter, ebox, eckhart, eckhart koppen, eddie izzard, edward gorey, einstein, electric motorcycle, electric motorsport, electric vehicle, electronics research laboratory, elmo, emate, emulator, environment, environmental impact, erin mckeown, escale, exploit, express 530t, expressionengine, feature, feed, feedburner, filtering, finance, firmware, flynn center, font, ford, for sale, free, freeverse, freezing, front row, games, gears of war, gmail, google, gpr, grant hutchinson, graylisting, halo, hayao miyazaki, higher ground, highrise, hiking, hiroshi noguchi, hotspot, hulu, humor, hybrid, hybrid technologies, intel, iphone, ipod touch, isao takahata, itunes, jabber, javascript, jetblue, jfk, jon stewart, kid koala, launchd, layover, leopard, liberal, long trail, mac, macbook pro, macworld, maczot, mail, makkintosshu, marathon, marketing, matthias melcher, media, mesagepad, messagepad, microbus, microsoft, mobileme, money, monitoring, moon river, motorola, movie, movies, mrtg, music, mwsf07, mystic, nascar, ncx, nda, newton, newton press, newtontalk, newton x press, nick park, npr, openpbx, open source, operation ivy, optimization, osheaga, osx, os x, owc, paul guyot, pbx, pdf, pico card, pixar, plist, plug-in, pod jungle, politics, psp, pump-and-dump, quicksilver, racism, rack-n-roll, ratatouille, rebooting, recycling, required reading, restoration, review, roadster, room without a window, rss, scion, screencast, script, security, server, sesame street, seven days, shame, shoppinging cart, simon bell, small dog electronics, snow leopard, social, software, solution, spam, spam haus, startup item, statistics, status, stefano paris, stephen colbert, steven colbert, steven frank, studio ghibli, subethaedit, subversion, sync, syndication, sysmon, tablet, tags, tax, technorati, tesla, tesla motors, textpattern, the colbert report, the daily show, the flaming lips, the gashleycrumb tinies, times argus, titles, todd kollins, tom gage, travel, trends, troubleshooting, twitter, typography, tzero, unicel, unna, update, upgrade, url title, user interface, v710, venue, verizon wireless, vermont, victor rehorst, volkswagen, volvo 122, vpr, vw, wait wait don't tell me, wall-e, wallace & gromit, wavelan, web, web 2.0, web site, whitepaper, wifi, wwdc, wwnc, xbox 360, xbox live, ze frank, zero emission

Technorati Chart for 'darwin'

Articles Tagged "darwin":

Sysmon Startup Item with Leopard Launchd Support ¬

2008-08-20

I’ve been sitting on, and tweaking infrequently, a launchd plist for Mac OS X 10.5 Leopard (and Server, of course) for launching the Sysmon daemon at boot and keeping it running. Well, it’s time to release it out into the wild, so without further ado:

sysmon-startupitem-0.4.tar.gz

This is an update to my Sysmon StartupItem in that I’ve rewritten the install script to install either the StartupItem or the launchd plist file where appropriate (utilizing the little trick I wrote about a few days ago), plus updates to the documentation and such. It should support Panther & Tiger via the StartupItem and Leopard via the launchd plist. Of course, more details and previous versions can be found on the Development page.

Let me know how it goes if you use it.

Testing the OS Version on Darwin/Mac OS X in bash ¬

2008-08-14

I’ve been updating an installer bash script that needs to install different files depending on the version of Mac OS X (and Darwin, for that matter) that the machine is running and so set out to find the easiest, most straightforward way to check the OS version.

Of course, the hostinfo command shows you most of the juicy details one would need, but it’s not worth trying to parse it. sysctl lets you query various kernel states, including the OS release version:

sysctl -n kern.osrelease

Which will spit back something like the following (on Mac OS X 10.5.4, in this example):

9.4.0

This is the Darwin release number. To convert a darwin release version number to a Mac OS X version number just subtract 4 from the major revision (9, in this case) and then prepend the ’10.’ to the entire thing. So, 9.4.0 becomes 10.5.4.0.

You can also use uname -r to get the OS release version, but I’m going to stick with sysctl for now.

Of course, you can’t do a direct comparison, so you’ll want to compare either the major or the minor revision (the last release field is always zero, so it can be ignored). The easiest way to do that is to pipe the output from sysctl through the cut command.

The following will give you the major release number (again, 9, in this case):

sysctl -n kern.osrelease | cut -d . -f 1

It cuts the output of sysctl on the ‘.’ delimiter and returns the first field. We can return the second field (the minor revision; 4, in our example) like so:

sysctl -n kern.osrelease | cut -d . -f 2

In my script, I simply needed to test if the machine was running Tiger or earlier, or Leopard or newer. Here’s a quick example of getting that functionality:

#!/bin/bash
if [ `sysctl -n kern.osrelease | cut -d . -f 1` -lt 9 ]; then
	echo "Tiger or earlier"
else
	echo "Leopard or newer"
fi

If you’re doing something more advanced, it might be easier to set variables first:

darwinos_major=`sysctl -n kern.osrelease | cut -d . -f 1`
darwinos_minor=`sysctl -n kern.osrelease | cut -d . -f 2`

Then just reference $darwinos_major & $darwinos_minor whenever needed.

A Minor Sysmon Startup Item Update ¬

2007-05-23

I’ve released another minor update to my Sysmon StartupItem.

This release enables the ability to disable the Startup Item without needing to actually move/remove it. It now requires that either a SYSMON=-YES- or SYSMON=-NO- line in your /etc/hostconfig file, but this is a fairly common practice/requirement for Startup Items.

Of course, now the Mac OS X 10.5 (Leopard) has been delayed until October, I can continue to procrastinate on porting this over to a launchd job.

Sysmon Startup Item Update ¬

2007-02-19

It’s odd that I’ve done this seven months, to the day, since the initial release, but today I’ve released a minor update to my Sysmon StartupItem.

This is a very minor release and just improves the implementation of RestartService() as well as moving the install directory to the more appropriate /Library/StartupItems (instead of /System/Library/StartupItems/).

I really need to port this to launchd instead of improving it, but hey, that’s how it goes sometimes.

Sysmon Startup Item for Darwin/Mac OS X ¬

2006-07-19

I’ve created a basic Darwin/Mac OS X Startup Item for the Sysmon (version 0.92.2, as of this writing) server monitoring and failure notification daemon.

Basically:

  1. Download, build, and install Sysmon
  2. Download and uncompress the Startup Item
  3. Read my included README file
  4. Run ‘install.sh’
  5. Drop your .config files for sysmond in /etc/sysmond/
  6. Run ‘sudo /sbin/SystemStarter start “Network Monitoring”’

The last command launches sysmond via the Startup Item and if you reboot it’ll come back up automatically as well. Read the README file for the specifics.

This Startup Item and its install script are released under the BSD license (see the included LICENSE file) and can be downloaded here:

Sysmon-StartupItem-0.1.tar.gz

It looks like I’ll be working with Sysmon some more, so expect a bit more on this in the near future.

Update: The latest release can always be found on the Development page.