To sync, or not to sync


I was browsing the posts at danny’s blog yesterday, and he has a page there about the home network he wants to create.  One of the things he’d like to be able to do with this network is have his portables sync with the information on the server as soon as they pick up the network’s wireless signal.  It sounded like something that could be done without too much trouble, and I knew just where to go to find an answer.  Sure enough, within minutes of posting the problem to the Mac> group at ISCABBS, PogueMahone came back with this beauty:

Maybe a cron job that runs /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I and checks the SSID field for the one you’re looking for, pings the server to be sure it’s there, and then kicks off an rsync to sync the directories up.

Seems like a good start to me.  I’ve been reading that Apple is deprecating the cron daemon in Tiger in favor of launchd, and I’m not sure how that might change this script, but the idea certainly seems feasible. 


2 Responses to “To sync, or not to sync”

  1. Danny Says:

    One problem I was having with the concept is that the airport cards are powered down when the machine is asleep. They don’t wake up except when the computer is woken up manually. A hardware ethernet card can be woken up with a network packet, because they always have current running through them, but Apple (and I imagine other manufacturers) put their wireless cards completely out when the machine sleeps.

    I might have to fall back on my second plan, which was a “docking station” for battery charging and syncing. Not as elegant as the machine syncing up from my messenger bag where I dropped it in the front hall when I came in. But hey.

  2. nicheplayer Says:

    Ah. OK. That’s the part of the equation I was missing. I didn’t even realize that a hardware Ethernet card would wake up on on receiving a packet. Maybe a sync is something best left to a proactive process?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: