Comment 56 for bug 634487

Jonathan Wolter (jawolter) wrote :

If this is useful in diagnosing the problem or solution, I tried using nice when running the install, and it worked 2 times. Failed 2 times. The last time I added the --adjustment=19, and it succeeded. Is it an IO related problem? Here's my full script.

#!/bin/bash
sudo add-apt-repository "deb http://archive.canonical.com/ natty partner"
sudo apt-get update
#Accept the Java license.
for i in bin jdk jre; do
  echo "sun-java6-$i shared/accepted-sun-dlj-v1-1 select true" | sudo debconf-set-selections
done
# convoluted way to install java. this seems to only work some times! Race condition?
# https://forums.aws.amazon.com/message.jspa?messageID=199841#199841
sudo nice --adjustment=19 apt-get install -y sun-java6-jre