Ugggg
After reading the manual page on the apple developer site, it seems if there is no user present you want to use a different environment switch to the command. Super face palm right now as I have spent all day working on this, and am testing it out now
/usr/sbin/softwareupdate COMMAND_LINE_INSTALL -i -a
Testing it out on my script right now
what does the system.log say about it?? what about converting the OS dmg
to r/w, mounting it, download all the updates, use installer -pkg
/path/to/update -target /path/to/mountedImage to update the image and then
convert it back to read only? you can change the dmg name slightly and
test prior to adding to a config and recompiling or even apply the updates
right to the compiled config. might take a little longer on your end but
saves time during imaging.
eric winkelhake
mundocomww
office 312 220 1669
cell 312 504 5155
My understanding that is the bug, because that is what the compiled does right? It just adds the installs do a disk image of the OS right? There is some bug where the new packages are now flat packages or something? They do not install on the disk image.
Unfortunately this part of the script flushes the logs so there are no logs, I will have to turn that part off I guess to help troubleshoot it.
OK so I popped open the console app once it logged in (I had to write a quick apple script to make a user log in during the process, don't ask why and there is no reason other than piece of mind for a co-worker) and you must disable scheduling for auto checks for software update, because if it auto checks during your command, it will kill your process. So here is the software update of my script
# log in as local admin to run software update tool
/usr/bin/osascript <<EndOfMyScript &
tell application "System Events"
keystroke "$admin1_short"
keystroke return
delay 3.0
keystroke "$admin1_passwd"
delay 3.0
keystroke tab
keystroke return
keystroke return
end tell
EndOfMyScript
done
# now run software update to bypass known isntaller bugs in compiled images
/usr/sbin/softwareupdate --schedule off
/usr/sbin/softwareupdate COMMAND_LINE_INSTALL -a -i
Basically if you see a client sitting at the log in screen it has finished. I got a co-worker that did not like the idea of the machines sitting there at the log in screen doing nothing while running update. So, now if the machine is logged in, it is still updating, if it sits at the log in screen, it is done. Even though I enforced a reboot in the script as well. Some people I guess require visual tools when working.
So far this works as coded, so FYI if anyone was reading...I am still testing it out as we speak though
-Tom