Install Sun Java on etch

Janning Vygen vygen at planwerk6.de
Wed May 9 17:14:21 CEST 2007


I just tried to install sun-jav5-jre with FAI on etch with softupdate.

the hints in 
http://www.mail-archive.com/linux-fai@rrz.uni-koeln.de/msg02045.html
helped a lot but didn't work (maybe because of etch)

I ran into problems because debconf must ask for acceptance of java license. 
As aptitude runs in non-interactive mode it aborts installing java:

   sun-dlj-v1-1 license could not be presented
   try 'dpkg-reconfigure debconf' to select a frontend other 
   than noninteractive
   dpkg: Fehler beim Bearbeiten 

I want to share the two hours of work to make it run smoothly.

1. You need to add "non-free" packages to your sources.list. I place it in a 
hook beacuse i must run it before instsoft runs

     $ cat hooks/softupdate.DEFAULT
     #!/bin/sh
     if ifclass JRE; then
        fcopy /etc/apt/sources.list | grep -q \. && apt-get update
     fi

2. Add sun-java5-jre to your packages_config file (just for documentation 
purpose, see 3.)

     $ cat conf/package_config/JRE
     PACKAGES aptitude
     sun-java5-jre

3. Add a hook to install it manually with a little trick:

     $ cat hooks/softupdate.JRE
     #!/bin/sh
     yes 'yes' | DEBIAN_FRONTEND=Readline apt-get install sun-java5-bin

now everything runs non-interactively

If you don't use softupdate rename your hooks accordingly.

i hope it helps anyone. 

kind regards
Janning



More information about the linux-fai mailing list