Hello. When I run softwareupdate from cron on all my lab machines the update always hang up, the updateprocess just stays like that for days. But when I do it from the terminal myself, it works. I've taken a "snapshot" of where I hangs with "ps"
Code:
797 su
796 /usr/bin/su -c "/tmp/0/TemporaryItems/com.apple.SoftwareUpdate/iTunesX.pkg/Contents/Resources/InstallHelper" /Applications/iTunes.app/Contents/Resources/iTunesHelper.app
795 sh /tmp/0/TemporaryItems/com.apple.SoftwareUpdate/iTunesX.pkg/Contents/Resources/preinstall /tmp/0/TemporaryItems/com.apple.SoftwareUpdate/iTunesX.pkg / / /
688 /System/Library/PrivateFrameworks/Installation.framework/Resources/runner
683 /System/Library/PrivateFrameworks/DiskManagement.framework/Resources/DiskManagementTool -uuid EFC86EFA-66A7-11DA-AE5F-000D9341FF66
682 /usr/sbin/softwareupdate -i -a
So I think this is kinda strange ? When in no active tty (??, right way to say i t ?) it stops and stays there, at iTunesX.pkg's preinstall script. I've also included that script here:
Code:
#!/bin/sh
if [ -e "$3/Applications/iTunes.app/Contents/Plug-ins" ] ; then
/bin/rm -rf "$3/Applications/iTunes.app/Contents/Plug-ins" 2> /dev/null
fi
if [ -e "$3/Applications/iTunes.app/Contents/Resources/pt.lproj" ] ; then
/bin/rm -rf "$3/Applications/iTunes.app/Contents/Resources/pt.lproj" 2> /dev/null
fi
if [ -e "$3/Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/Resources/pt.lproj" ] ; then
/bin/rm -rf "$3/Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/Resources/pt.lproj" 2> /dev/null
fi
/usr/bin/su $USER -c "\"$PACKAGE_PATH/Contents/Resources/InstallHelper\" /Applications/iTunes.app/Contents/Resources/iTunesHelper.app" 2> /dev/null
"$PACKAGE_PATH/Contents/Resources/InstallHelper" 2> /dev/null
/usr/bin/su $USER -c "/usr/bin/defaults write com.apple.iTunesHelper FreshInstall 1" 2 > /dev/null
exit 0
I would be VERY glad if someone could tell me what is going on ? And why this happens ?
I launch the update like this:
Code:
COMMAND_LINE_INSTALL=1; export COMMAND_LINE_INSTALL; /usr/sbin/softwareupdate -i -a
Also tried without the Bash variables above.
And yeah. It didn't use to behave like that. It's only with the new iTunes...