Home Forums Software InstaDMG Iceberg PKG installs files but postflight script does nothing

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #375358
    harveyDOV
    Participant

    Hi,

    I have created a PKG file using iceberg where it installs a few files in Applications and a Pref file else where. It also a shell script attached to the postflight. I have built the PKG file and tested it by manually running and it pretty much does everything I want.

    I have then added it as my last Custom Package in InstaDMG. The image works as it should with regards everything else but when it comes to my custom package it will install the files but not run the script.

    I have attached the script below and would be greatful if anyone can point out where I’m going wrong!

    [code]###Set time zone, set time server, start NTP
    $3/usr/sbin/systemsetup -settimezone Europe/London
    $3/usr/sbin/systemsetup -setusingnetworktime on
    $3/usr/sbin/systemsetup -setnetworktimeserver time.euro.apple.com
    $3/usr/sbin/systemsetup -setremotelogin on
    $3/usr/sbin/systemsetup -setcomputername “New Mac”

    ###Turn on ARD and enable all permissions
    $3/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent
    $3/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all

    #Rename the startup disk to “Macintosh HD”
    $3/usr/sbin/diskutil rename / “Macintosh HD”

    ###Set Languages
    $3/usr/bin/defaults write /Library/Preferences/.GlobalPreferences AppleLanguages “en”
    $3/usr/bin/defaults write /Library/Preferences/.GlobalPreferences AppleLocale “en_GB”
    $3/usr/bin/defaults write /Library/Preferences/.GlobalPreferences Country “en_GB”[/code]

    Many thanks to all.
    Harv.

    #375365
    Patrick Fergus
    Participant

    I’m assuming you’re running this script/installing this pkg when you’re building your InstaDMG image.[code]###Set time zone, set time server, start NTP
    $3/usr/sbin/systemsetup -settimezone Europe/London
    …[/code]systemsetup will only modify/edit the startup disk. If you’re using systemsetup you’ll need to use the command during startup of a freshly imaged machine.[code]###Turn on ARD and enable all permissions
    $3/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent
    $3/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all [/code]kickstart suffers from the same issue as systemsetup, but you can include “-targetdisk “$3″” in your switches to make kickstart point at the target disk rather than the startup disk.[code]#Rename the startup disk to “Macintosh HD”
    $3/usr/sbin/diskutil rename / “Macintosh HD”[/code]The mount point of “/” is the root of the current startup disk, not the InstaDMG target. Again, you’ll need to use the command during startup of a freshly imaged machine.[code]###Set Languages
    $3/usr/bin/defaults write /Library/Preferences/.GlobalPreferences AppleLanguages “en”
    $3/usr/bin/defaults write /Library/Preferences/.GlobalPreferences AppleLocale “en_GB”
    $3/usr/bin/defaults write /Library/Preferences/.GlobalPreferences Country “en_GB”[/code]You are aiming for the following so your commands target the InstaDMG image:[code]###Set Languages
    $3/usr/bin/defaults write “$3″/Library/Preferences/.GlobalPreferences AppleLanguages “en”
    $3/usr/bin/defaults write “$3″/Library/Preferences/.GlobalPreferences AppleLocale “en_GB”
    $3/usr/bin/defaults write “$3″/Library/Preferences/.GlobalPreferences Country “en_GB”[/code]- Patrick

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed