some commands from firstboot and postflight scripts do not execute
Hey everyone, I'm hoping I can get some help here with a few annoying problems i'm having with the firstboot and postflight scripts. . . .
I've got the scripts running successfully, not all the commands in the scripts seem to be taking effect First, i've got these 2 commands in my firstboot script to disable airport and turn on wake on LAN:
[code]#Disable Airport
$networksetup -setnetworkserviceenabled AirPort off
# Activate WakeOnLAN.
$systemsetup -setwakeonnetworkaccess on[/code]
the network setup and system setup variables have been left as they were in the template:
[code]
systemsetup="/usr/sbin/systemsetup"
networksetup="/usr/sbin/networksetup"
[/code]
Everything else in firstboot works except for them. For the airport command, the log shows an error saying "AirPort is not a recognized network service" so I'm guessing I need to specify the service in some other way. For the wake on LAN command, it returns "Wake On Network access: Not supported on this machine".
2nd, I need to suppress the creation of .DS_Store files on network shares, so I've added
[code]
$defaults write "${PREFS_DIR}/com.apple.desktopservices" DSDontWriteNetworkStores true
[/code]
to my postflight script. Here's the definitions of the variables:
[code]
# 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/"
[/code]
But, accounts created on a machine with that image still leave the DS files on the network until I run the defaults write command from the terminal. Any ideas? The DS store file issue is the most important . . . .