[launchd-dev] Launch daemon not started after migration

Sidney San Martín s at sidneysm.com
Thu Jul 8 08:05:45 PDT 2010


On Jul 7, 2010, at 6:08 PM, Jerry Krinock wrote:

> On 2010 Jul 07, at 13:20, Sidney San Martín wrote:
> 
>> My launch daemon is not loaded after Setup Assistant migrates it to a
>> new machine. It's loaded just fine after a restart.
> 
> I presume you mean your "launchd daemon"

Sure. I'm used to staring at the LaunchDaemons and LaunchAgents folders.

>> This isn't strictly within the domain of launchd, but has anyone run
>> into specific cases where Migration Assistant does/does not load
>> migrated plists in /Library/LaunchDaemons/? If not, I'll work around
>> it and file a bug.
> 
> I'm not surprised at this behavior.  Your daemon probably has a RunAtLoad value which is triggered when the user logs in.  Assuming that  Setup Assistant creates the account, logs in the user, and then copies files (including ~/Library/LaunchDaemons) to it, the latter will have missed the boat on the logging in and therefore not be loaded.

I'm talking about a system launchd daemon. (I have a per-user agent too, it starts fine).

> I would say the bug is that, after copying files, Setup Assistant should change its order of operations, or maybe force a logout/in after it is done.

I don't think users are logged in as part of the migration (but I've been wrong before). Migration/Setup Assistant creates the user, copies the files, and sets permissions.

Either way, `sudo launchctl list` does not show my job. It sounds like a bug (at the end of migration, new job plists would have to be explicitly loaded), I just want to make sure I'm not missing anything.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6343 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20100708/ff554ec2/attachment.bin>


More information about the launchd-dev mailing list