- This topic has 4 replies, 3 voices, and was last updated 13 years, 7 months ago by
Rusty Myers.
-
AuthorPosts
-
August 18, 2011 at 7:15 am #381102
Laura
ParticipantHi All
Have just started using InstaDMG and am blown away by what it can do.
I’ve successfully built several test images, however as I add more and more packages (usually my own) I’m finding some are failing.
I read the blurb on the Office 2011 installer and got that working correctly which led me to believe that paths in my packages are the culprit.What is best practice here? If I add “$3” to the beginning of my scripts (ala the Office installer fix) should I be safe? How will that work if the package is installed manually? (I am sketchy on the $1 $2 $3 usage)
Also, I am compiling a ‘first boot’ script that sets a whole bunch of settings (ARD, system preference settings, sleep settings etc), what is best practice here? What should be set by a first run script as apposed to being packaged and installed as part of the initial build?
Thanks for any guidance.
— LauraAugust 18, 2011 at 2:08 pm #381105Allister Banks
ParticipantWelcome Laura!
Those questions may be a little general, instead of addressing what may be the practical things you need for the task at hand in your environment. I don’t want to be too vague and miss the target, so I’d just point you to the sticky on this forum, and in particular here are some first-boot items that may be of use:
[url]http://osxdeployment.com/wiki/Firstboot_Script_Commands[/url]
It’s your decision what to omit, what is applicable to your environment and how you want do things like apply management.
Additionally, some things may be better left to your directory service(like AD or OD if your environment utilizes it), deployment tools or patch/config state management tools.Bash is the ‘lingua franca’ of scripting, so its best to jump in with both feet, but the first step is trying things interactively at the command line. Muscle memory is the best teacher IMHO, and then you can be certain things can be done automatically and to some extent silently.
Let me know if I’m off-base, and how better we could be of assistance. In the sticky is also an IRC chat room you’re welcome to reach out to as well.
Allister
August 26, 2011 at 6:14 am #381122Laura
ParticipantOk so I have been doing some testing
I made a payload less package, with a script that just uses touch to create an empty file in /Users/Shared which failed. (The package installed without errors according to InstaDMG but no file existed in the location)
I have been reading: http://www.osxdeployment.com/wiki/InstaUp2Date_Guide to try and understand the process better.
When I created my package using PackageMaker I chose a minimum target of 10.5 which doesn’t give you the options of postflight and preflight but postinstall and preinstall
Should I be choosing 10.4 as minimum target to get the *flight options and use those?
Should it matter whether my script is post- or pre- install?
Is appending “$3” to the start of each path, per the above link examples, necessary? Is this some kinda funky Lion stuff I’m running into?
These are the sort of “Best Practice” answers I’m looking for, not specifics on one particular package but generally the best way to go about things
Thanks much.
August 26, 2011 at 2:25 pm #381124Allister Banks
ParticipantI guess a best practice is getting friendly with a text editor like TextMate or BBedit or, ol’ faithful, vi. Then you can modify this:
[url]http://managingosx.wordpress.com/2010/02/18/payload-free-package-template/[/url]
Another best practice, alluded to with the ‘vi’ statement above, is that using cli-equivalents means you can script things – packagemaker can leave a lot to be desired. TheLuggage is a tool with a steep learning curve, but big payoffs in thinking, with text, about how installs happen. When it comes to a tool that’s great at repackaging stuff you manually install, I like Jamf’s Composer, and if manual there are a lot of fans of Packages, by Stephane Sudre of Iceberg fame.Please keep ’em coming,
Allister
August 26, 2011 at 2:34 pm #381125Rusty Myers
ParticipantPackagemaker stinks, Use iceberg.
I’m seeing the same thing with 10.5 as the minimum. You can choose 10.4 as a minimum target. I find that easier because you can edit the package after it’s created.
Does your package work when run from the GUI? How about the command line (installer -pkg /path/to/package -target /)?
If you post the script, that may help too. I’ve not done much testing on Lion yet, so it could be just something funky. As you get each package working, you start to find the best practices for your environment. I suggest you write these down so you can share them with us! 😉
Rusty
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed