Install Sun Java on etch

Emil Gorter emil at ripe.net
Wed May 9 18:40:28 CEST 2007


Hi Janning,


On Wed, 9 May 2007 17:14:21 +0200,
Janning Vygen <vygen at planwerk6.de> wrote:
 ...
>    sun-dlj-v1-1 license could not be presented
 ...
> 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


I ran into the same, but found a different solution.  Yours seems 
more correct than mine, but I'd like to share it anyhow.

First I did the interactive install and realised that my answer had 
been stored somewhere, because the 2nd time I was not asked to 
confirm again.  I found it sitting in /var/cache/debconf/config.dat 
so I added the following to my hooks/instsoft.WORKSTATION

---------------------------------------------------------------------
CONF=$FAI_ROOT/var/cache/debconf/config.dat

if grep "^Name: shared/accepted-sun-dlj-v1-1" $CONF >/dev/null 2>&1;
then
        echo "Sun license already in $CONF"
else

cat >> $CONF <<EDIT_END

Name: shared/accepted-sun-dlj-v1-1
Template: shared/accepted-sun-dlj-v1-1
Value: true
Owners:
Flags: seen
EDIT_END

        echo "applied SUN license hack.."

fi
---------------------------------------------------------------------


I guess it's not completely legal to 'preset' your acceptance, but I 
did read and accept the license the 1st time I did it interactively.. :-)

Cheers,

Emil Gorter



More information about the linux-fai mailing list