AFP548

adding user directory creation to createUser?

I need to create user directories in the instaDMG build phase in order to populate them with software setup stuff (support files, prefs, etc) with other packages prior to deployment in student labs. createUser.pkg leaves that to first login, but I get messy results that way so I decided to try and get it to create the directories too. Another script I found here creates a user with the associated directory, so I took the directory creation chunk and modified its variables to match those in the postflight script in the createUser.pkg. I ended up with the following lines, which I added to the end of the postflight script (right before exit 0). It works when I launch it on a running Mac, but the directories don't get created in the instaDMG build process. The users ARE created, just not the directories. What am I doing wrong? [code] /bin/mkdir "/Users/${shortname}" /usr/bin/ditto -rsrcFork /System/Library/User\ Template/English.lproj "/Users/${shortname}" /usr/sbin/chown -R "${shortname}":${gid} "/Users/${shortname}" [/code]
Exit mobile version