Launch daemon not started after migration
My launch daemon is not loaded after Setup Assistant migrates it to a new machine. It's loaded just fine after a restart. 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.
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"
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 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.
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.
participants (2)
-
Jerry Krinock
-
Sidney San Martín