AFP548

User modification package

I am trying to do some user modification after successfully booting an InstaUp2date image with a package that contains the setup shell script and launch daemon item. I am seeing some odd behavior that i cant account for and was wondering if someone might be able to explain it. I have a package added to InstaDMG image that installs a shell script into the /Library/Scripts/CompanyName/ directory along with a LaunchDaemon plist that gets installed in /Library/LaunchDaemons/. This package gets properly incorporated into the image, and at first boot, the script gets launched and does a few things (i.e. time zone setup, etc) and eventually reboots the system. Interestingly enough, when the system returns the shell script is now of file type data and can no longer be executed by the LaunchDaemon. Can anyone explain why that occurs? Is it launchctl that does that? Secondly, as part of the system changes i make, i have been trying to make changes to a pre-created user that is also packaged (a la createUser.pkg) into the image. I am simply trying to move a pre-created com.apple.dock.plist and com.apple.desktop.plist from their packaged location from within the Scripts directory as described above, to the pre-created user's ~/Library/Preferences/ directory. Now i understand that the image doesn't create the /Users/PreCreatedUserDirectory, but i am trying to do the moves after the user logs in at first boot. Which i would think means, the user's ~/Library/Preferences/ directory has been created by that point. Can anyone shed a little light on why my approach isn't working as expected? Seems simple enough to me, but i know there are far more knowledgeable folks on this list than i, LOL, that can help guide me to a solution.
Exit mobile version