Hi All,
Below is an example of the NEW postinstall.sh from Casper 8.5.x... there have been a few posts logged here.. so in the absence of a KB i'm posting it here with Line Numbers.
My Image has a manually triggered policy (line 32)... this policy included a reboot.. which then meant that the Mac got a reboot loop running jamfHelper at login as it would reboot before the script finished & cleaned itself up.. (lines 46 & 47)..
Hope this helps others & that JAMF create a KB article for this..
1 #!/bin/sh
2
3 ######################################################
4 ## This script is created by Casper Imaging to perform post-imaging
5 ## tasks that cannot be performed on a non-booted volume.
6 ## Created Thursday, May 3, 2012 at 5:48:05 AM
7 ######################################################
8
9 ## Lock down the login window
10 /usr/sbin/jamf launchJAMFHelper -path '/Library/Application Support/JAMF/bin/jamfHelper.app'
11
12
13 ## Fix ByHost files
14 /usr/sbin/jamf fixByHostFiles -target /
15
16
17 ## Set the homepage here
18 /usr/sbin/jamf setHomePage -homepage 'http://www.myhomepage.com/' -fut -feu
19
20
21 /usr/sbin/jamf install -package '010 CS5_DS_210411_Install.pkg' -path '/Library/Application Support/JAMF/FirstRun/PostInstall/Resources'
22
23
24 ## Run any scripts that where specified to be run after reboot here
25
26
27 ## Run script 002 Create fstab For Users Partition.sh
28 /usr/sbin/jamf runScript -script '002 Create fstab For Users Partition.sh' -target / -path '/Library/Application Support/JAMF/FirstRun/PostInstall/Resources/' -computerName 'mymac' -username "" -p1 '' -p2 '' -p3 '' -p4 '' -p5 '' -p6 '' -p7 '' -p8 ''
29
30
31 ## Run script 020 Lion Policy Trigger.sh
32 /usr/sbin/jamf runScript -script '020 Lion Policy Trigger.sh' -target / -path '/Library/Application Support/JAMF/FirstRun/PostInstall/Resources/' -computerName 'mymac' -username "" -p1 '' -p2 '' -p3 '' -p4 '' -p5 '' -p6 '' -p7 '' -p8 ''
33
34
35 ## Delete the temporary user and restore the original files for autologin
36 /usr/sbin/jamf deleteAccount -username adobeinstall -deleteHomeDirectory
37 /bin/cp -Rpf '/Library/Application Support/JAMF/FirstRun/PostInstall/Resources/Backup/kcpassword' '/private/etc/kcpassword'
38 /bin/cp -Rpf '/Library/Application Support/JAMF/FirstRun/PostInstall/Resources/Backup/com.apple.loginwindow.plist' '/Library/Preferences/com.apple.loginwindow.plist'
39
40
41 ## Since we installed software, update inventory
42 /usr/sbin/jamf recon
43
44
45 ## Delete this script and the corresponding launchd item
46 /bin/rm -rf '/Library/Application Support/JAMF/FirstRun/PostInstall/'
47 /bin/rm /Library/LaunchDaemons/com.jamfsoftware.firstrun.postinstall.plist
48
49
50 ## Since we logged in, reboot to ensure a clean state
51 /usr/sbin/jamf reboot -immediately
52
53
54 exit 0