AFP548

Packaging Bind (join) Active Directory Domain for InstaDMG

I have no problems binding to Active Directory (or even OD). However, I am having one minor, yet very tedious issue. I've decided to use launchd (scripts) to both rename the computers, and bind them to AD. It's easy to package LaunchDaemons, and it seems to be the preferred method. We have a local script that automatically renames the computer based on the MAC address (first boot). And we have another script to bind them to the domain. So, I can package the "rename" daemon and the "joindomain" daemon and tell them both to run at startup, but the problem is that sometimes it will bind before it is actually renamed. In other words, there doesn't appear to be a way to tell them in what order to launch (via launchd). Both functions work, I just can't seem to get it to reliably rename the computer before it tries to join the domain. I can't do this as a loginhook, because of course that would require someone to login before the computer was renamed. Also, we do not have OD or AD with schema extensions, so I can't make any changes at the directory level. Anyway, I was just hoping somebody had a better way. Perhaps there is a way to run our "macrename" script during installation... So I guess the question is, if you use AD, how are you configuring & packaging the functionality that renames and binds the computers to the domain? My current method should work perfectly if I could just tell launchd to run daemon before the other and wait for he first to complete...
Exit mobile version