Postflight script doesn’t run?
Hi,
I've tried to make a postflight script package using Iceberg, because I want it to run some scripts after installation. However it's doesn't seem to run the script.
I've simply created a new package in Iceberg, made an empty text file that I install in /private/var and then selected my settings.sh script below (put together from helpful posts on this forum) as the postflight script.
Also I've chmod'ed the settings.sh script to that it is executable.
Any ideas why it doesn't run?
This is my sh file:
#!/bin/sh
###Set correct permissions on /Applications
sudo chmod -R 775 /Applications
###Recreate and fix trash (logout and in to recreate)
rm -rf ~/.Trash
rm -rf ~/Desktop
systemsetup -setcomputername typofonic-com
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup 1
defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup 0
###Postflight script to set time zone and start NTP (Leopard)
###Set variables
systemSetupLocation="/usr/sbin/systemsetup"
timeZone="Europe/Copenhagen"
networkTimeServer="time.euro.apple.com"
###Set time zone, set time server, start NTP
$systemSetupLocation -settimezone $timeZone
$systemSetupLocation -setnetworktimeserver $networkTimeServer
$systemSetupLocation -setusingnetworktime on
#Rename the startup disk to "os x"
/usr/sbin/diskutil rename / "os x"
/usr/bin/defaults write /Library/Preferences/.GlobalPreferences AppleLanguages "da"
/usr/bin/defaults write /Library/Preferences/.GlobalPreferences AppleLocale "da_DK"
/usr/bin/defaults write /Library/Preferences/.GlobalPreferences Country "da_DK"