Forum Replies Created
-
AuthorPosts
-
December 29, 2010 at 2:57 pm in reply to: 10.6 Workgroup Manager sees AD computers, won’t create OD computer account. #380207
walt
ParticipantAnother way to workaround this is to enable Inspector in WGM. Then create a “non-duplicate” computer via WGM (name it anything that won’t throw the error). Then on the newly created computer record’s inspector tab edit the RealName and RecordName attributes to be the actual name you want the computer to have. Then you won’t get the duplicate error. I filed a Bug Report with Apple about this, hopefully they’ll fix it.
December 22, 2009 at 12:04 pm in reply to: Re-packaging Adobe CS4 Design Premium with logGen, pkgGen, and Iceberg #377709walt
ParticipantFYI by default Composer doesn’t include files in /Library/Application Support/Adobe PCD/ which are required for licensing to work. I built my CS4 packages with Composer after changing the preferences in composer to include these files and it worked fine. They do this by default in case you are deploying an update and not the initial install.
walt
ParticipantNo, packaged scripts will always work in InstaDMG. What he means is that the specific command you are using is really meant to be run on a live/booted system. When you run that networksetup command in a script that is in an installer package, the command will, by it’s design, run on and in turn make changes to the booted system volume. CHROOT allows commands to run inside of “jails” so to speak, so that you can direct a command to not go outside of a specific directory, which may get this command to run targeting a volume that isn’t actually booted (your target InstaDMG Image).
Setting up the wireless network the way you are can be done using a first boot script. What this means is you create an install package to use with InstaDMG that installs a startup item, that startup item can be a shell script that runs the commands you want when the computer first boots, this solves the problem of not being able to target certain commands at systems that aren’t booted, like the one you are trying to use here.
Here is an example of an installer package I use to set standard settings on my images, part of which includes a script that runs on first boot:
[b]Postflight Script from the package:[/b]
[code]
#!/bin/sh# Standard settings for images.
# Script is meant to be run as a postflight script in a .pkg file. Also installs startup settings script as a Launchd item which is inside the package /Contents/Resources directory.
##### Begin Declare Variables Used by Script #####
# Declare ‘defaults’and ‘PlistBuddy’.
defaults=”/usr/bin/defaults”
PlistBuddy=”/usr/libexec/PlistBuddy”# Declare directory variables.
PKG_DIR=”$1/Contents/Resources”
SCRIPTS_DIR=”$3/Library/Scripts/Purchase”
LAUNCHD_DIR=”$3/Library/LaunchDaemons”
PRIVETC_DIR=”$3/private/etc”
PREFS_DIR=”$3/Library/Preferences”
USERPREFS_DIR=”$3/System/Library/User Template/English.lproj/Library/Preferences”
ROOT=”$3/”
UPDATE_DYLD=”$3/usr/bin/update_dyld_shared_cache” # Set variable to location of update_dyld_shared_cache command on target volume.##### End Declare Variables Used by Script #####
##### Begin Startup Settings Script Installation #####
# This script that is installed on the target volume sets settings that need to be set on the first boot of the image.
# Create scripts directory.
mkdir “${SCRIPTS_DIR}”
# Copy startupssettings.sh script to the scripts directory.
cp “${PKG_DIR}/startupsettings.sh” “${SCRIPTS_DIR}”
# Install Launchd item to /Library/LaunchDaemons.
$defaults write “${LAUNCHD_DIR}/edu.purchase.startupsettings” Label edu.purchase.startupsettings
$defaults write “${LAUNCHD_DIR}/edu.purchase.startupsettings” ProgramArguments -array
$PlistBuddy -c “Add :ProgramArguments:Item\ 1 string /Library/Scripts/Purchase/startupsettings.sh” “${LAUNCHD_DIR}/edu.purchase.startupsettings.plist”
$defaults write “${LAUNCHD_DIR}/edu.purchase.startupsettings” RunAtLoad -bool YES# Give Launchd item correct permissions.
chown root:wheel “${LAUNCHD_DIR}/edu.purchase.startupsettings.plist”
chmod 644 “${LAUNCHD_DIR}/edu.purchase.startupsettings.plist”##### End Startup Settings Script Installation #####
##### Begin Preference Setting #####
# These settings can be set on the target volume before startup.
# Run update_dyld_shared_cache
$UPDATE_DYLD -universal_boot -root $ROOT
# Display login window as Name and Password.
$defaults write “${PREFS_DIR}/com.apple.loginwindow” SHOWFULLNAME -bool YES
# Use encrypted virtual memory.
$defaults write “${PREFS_DIR}/com.apple.virtualMemory” UseEncryptedSwap -bool Yes
# Set Safari Preferences.
$defaults write “${USERPREFS_DIR}/com.apple.Safari” HomePage http://www.purchase.edu/
$defaults write “${USERPREFS_DIR}/com.apple.Safari” ShowStatusBar -bool YES# Set Finder Prefereces.
$defaults write “${USERPREFS_DIR}/com.apple.finder” ShowMountedServersOnDesktop -bool YES
# No .ds-store files on Network Shares
$defaults write “${PREFS_DIR}/com.apple.desktopservices” DSDontWriteNetworkStores true
# Globally Set Expanded Print Dialouge Box.
$defaults write “${PREFS_DIR}/.GlobalPreferences” PMPrintingExpandedStateForPrint -bool TRUE
# Use short-name for logging into Network Shares
$defaults write “${PREFS_DIR}/com.apple.NetworkAuthorization” UseDefaultName -bool NO
$defaults write “${PREFS_DIR}/com.apple.NetworkAuthorization” UseShortName -bool YES# Set Apple Mouse button 1 to Primary click and button 2 to Secondary click.
$defaults write “${USERPREFS_DIR}/com.apple.driver.AppleHIDMouse” Button1 -integer 1
$defaults write “${USERPREFS_DIR}/com.apple.driver.AppleHIDMouse” Button2 -integer 2# Disable Time Machine Offers.
$defaults write “${PREFS_DIR}/com.apple.TimeMachine” DoNotOfferNewDisksForBackup -bool YES##### End Preferences Setting #####
exit 0
[/code][b]Startup Settings Script that is installed by the above postflight script and runs on first boot:[/b]
[code]
#!/bin/sh# System startup script that should be a Launchd startup script, the script deletes itself and the launchd item after completion.
# Define ‘kickstart’ and ‘systemsetup’ variables, built in OS X script that activates and sets options for ARD.
kickstart=”/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart”
systemsetup=”/usr/sbin/systemsetup”# Delete iMove (Previous Version) Directory if it exists, because we don’t need it.
rm -R /Applications/iMovie\ \(previous\ version\).localized/
# ARD Configuration
# Set options and activate ARD for only ctstech user with all privelages.
# First we have to define specified users with ARD privelages in a separate command.
$kickstart -configure -users adminuser -access -on -privs -all
# The next command configures the other ARD options.
$kickstart -activate -configure -allowAccessFor -specifiedUsers -clientopts -setmenuextra -menuextra yes
# Set time zone and time server.
$systemsetup -setusingnetworktime on
$systemsetup -settimezone America/New_York -setnetworktimeserver time.apple.com
# Activate WakeOnLAN.
$systemsetup -setwakeonnetworkaccess on
# Activate SSH.
$systemsetup -setremotelogin on
# Delete the script and the launchd item.
srm /Library/LaunchDaemons/edu.purchase.startupsettings.plist
srm “$0”
[/code]
Also don’t get discouraged, figuring out modular imaging to the point where I could actually build images to my liking took me a couple of months of reading and a lot of trial and error. My scripting skills also needed a lot of polishing :P. In the end the extra effort is worth it though. It will all make sense, just stick with it and ask questions if you run into trouble :).
walt
ParticipantLooking into a license management solution now, KeyServer is one I am looking into already. Any new or interesting options in the field that anyone’s used, or is KeyServer still the one to go with?
walt
ParticipantI do this and it works great for me. Here is the postflight script I use to install it with a package. Just make an installer package and install Keychain Minder in /Applications/Utilities. Change com.yourcompany in the script to whatever your orgs name is if you want.
[code]#!/bin/sh
# Install Keychain Minder and a Launchd item so it starts for every user.
# Declare ‘defaults’and ‘PlistBuddy’.
defaults=”/usr/bin/defaults”
PlistBuddy=”/usr/libexec/PlistBuddy”# Declare our working directories.
PKG_DIR=”$1/Contents/Resources”
APP_DIR=”$3/Applications/Utilities”
LAUNCHD_DIR=”$3/Library/LaunchAgents”# Install Launchd item to /Library/LaunchAgents.
$defaults write “${LAUNCHD_DIR}/com.yourcompany.keychainminder” Label com.yourcompany.keychainminder
$defaults write “${LAUNCHD_DIR}/com.yourcompany.keychainminder” ProgramArguments -array
$PlistBuddy -c “Add :ProgramArguments:Item\ 1 string /Applications/Utilities/Keychain\ Minder.app/Contents/MacOS/Keychain\ Minder” “${LAUNCHD_DIR}/com.yourcompany.keychainminder.plist”
$defaults write “${LAUNCHD_DIR}/com.yourcompany.keychainminder” RunAtLoad -bool YES# Give Launchd item correct permissions.
chown root:wheel “${LAUNCHD_DIR}/com.yourcompany.keychainminder.plist”
chmod 644 “${LAUNCHD_DIR}/com.yourcompany.keychainminder.plist”[/code]walt
ParticipantYou’re right, I didn’t read the man page closely enough. [url]http://developer.apple.com/Mac/library/documentation/Darwin/Reference/ManPages/man1/update_dyld_shared_cache.1.html[/url]
According to the man page the -root switch will work but you have to run the command from the volume you want to update the cache on so it matches.
[i]-root directory
This option specifies the root of an OS installation for which dyld’s shared cache should
be updated. This is used by the Installer to update the dyld shared cache in a partition
other than the one you into which you are currently booted. The cache files are created in
the var/db/dyld directory of the specified directory. [b]Note: if you are manually doing
this, be sure to run the update_dyld_shared_cache tool that is in the partition being
updated. This assures the cache format created will match that expected when booting off
that partition.[/b][/i]Also I noticed this in the man page as well:
[i]-universal_boot
This option can only be used running on an machine with an Intel processor. It builds
caches that can be used when booting on both 32-bit and 64-bit machines.[/i]It makes sense to to build the cache for 64 and 32 bit machines so I added that switch as well.
So the correct code for the postflight script would be:
[code]# Set variable to location of update_dyld_shared_cache command on target volume.
UPDATE_DYLD=”$3/usr/bin/update_dyld_shared_cache”# Set variable to target volume we are installing the package to.
ROOT=”$3/”# Direct command to target volume.
$UPDATE_DYLD -universal_boot -root $ROOT
[/code]That should do it.
November 9, 2009 at 7:42 pm in reply to: Weird Font Issues – Photoshop CS4 – Possible fontd issue? #377479walt
ParticipantSee this thread to resolve the dyld shared cache issue.
[url]https://www.afp548.com/forum/viewtopic.php?showtopic=25426[/url]
Hopefully that fixes your problem.
walt
ParticipantThanks for the tip. I was able to get this to work by putting this command in a postflight script and bake it into the image workflow, which is a little nicer than throwing it into a first boot script (I know I’ve got too many already).
# Set variable to target volume we are installing the package to.
ROOT=”$3/”# Direct command to target volume.
update_dyld_shared_cache -root $ROOTwalt
ParticipantGotcha, once I have write permission on the svn I will update the catalog files there.
walt
ParticipantI could do that, I’d be happy to maintain them. I just sent you an email.
As for the iLife Updates, the only reason I didn’t include the iLife DMG itself was I wasn’t sure how people created it (they may have used compressed, DVD Master, or read only).
I will add the iLife DMG into the catalog file (the compressed DMG).
walt
ParticipantI just noticed Apple seems to have posted an updated 10.5.8 Combo Update rather quietly on 9/24. Also it is a different file size than the original combo update DMG I had.
[url]http://www.apple.com/downloads/macosx/apple/macosx_updates/macosx1058comboupdate.html[/url]
walt
ParticipantI just started playing around with SIU in 10.6. One thing I found, which some may have already looked at, is the automator scripts Apple uses to create the images, kind of interesting.
/Applications/Server/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/
In theory couldn’t InstaDMG be integrated into SIU as an automator action(s)?
It sounds like Apple should hire you to develop it larkost :D.
walt
ParticipantThe way InstaUp2Date works is you place all of the packages that are required to build your image (Apple Updates, iLife, Office, etc.) into the /InstaDMG/InstallerFiles/InstaUp2DatePackages directory. Don’t place anything in the other folders except your Mac OS X Installer DVD in /InstaDMG/InstallerFiles/BaseOS.
Once you have that part done, InstaUp2Date uses Catalog Files that you create to build your images. Basically you create a catalog file, in which you reference the packages in /InstaDMG/InstallerFiles/InstaUp2DatePackages. There are example catalog files included with InstaUp2Date.
When you run InstaUp2Date it will only install the packages you want using InstaDMG based on what packages you referenced in your Catalog Files(s). The InstaUp2Date script creates symbolic links inside of the CustomPKG folders for you automatically (this is one of the major benefits of using InstaUp2Date so that you don’t have to do this manually).
You should read the InstaUpDate readme inside /InstaDMG/AddOns/InstaUp2Date/.
walt
ParticipantSo the launch agent runs successfully and the script executes right? It just doesn’t do what you want it to? Could you post the scripts that are running?
walt
Participant[QUOTE][u]Quote by: walt[/u][p]Okay so I successfully got the iLife Support 9.0.3 Update to apply by pulling the two package inside of it and installing them. I also installed iLife 09 on the same image and the update was still applied successfully. Basically you just need these two files (you can extract them with Flat Package Editor) from inside the iLife Support 9.03:
iLifeMediaBrowser_203.pkg
iLifeSlideshow_103.pkgWhen you install the update normally these packages that are referenced in the /Library/Receipts/boms directory.[/p][/QUOTE]
This is the solution to installing the iLife 9.0.3 update that worked for me. Also the updates were still applied after installing iLife.
As for Safari, I am not having any problems with Safari 4 and applying updates. I am using InstaDMG build 187.
-
AuthorPosts
Recent Comments