Skip to content

Stupid Puppet Trick: Agreeing to the Sun Java License with Debconf Preseeds and Puppet

I had a user ask for Java to be installed on the cluster systems, so I started up by making a simple JRE5 module for puppet, but this first one didn’t quite work:

class jre5 {
  package { "sun-java5-jre":
    ensure => latest;
  }
}

It doesn’t work because Sun wants you to agree to its license before installing the JRE. There’s a couple of ways around this. First, the old-school method:

ssh host "yes | apt-get -y install sun-java5-jre"

where ‘yes’ is a standard Unix program that just prints out “yes” over and over until the program on the other side of the pipe terminates. But “ssh host foo” is not the way of the managed infrastructure.

The second method, much more friendly to centralized management, is to first install debconf-utils on a candidate system, and then install sun-java5-jre on the same system. Once that’s done, you can query the debconf database to see how it stored your answers to the Sun license agreement:

ch226-12:~# debconf-get-selections | grep sun-
sun-java5-bin   shared/accepted-sun-dlj-v1-1    boolean true
sun-java5-jre   shared/accepted-sun-dlj-v1-1    boolean true
sun-java5-jre   sun-java5-jre/jcepolicy note
sun-java5-jre   sun-java5-jre/stopthread        boolean true
sun-java5-bin   shared/error-sun-dlj-v1-1       error
sun-java5-jre   shared/error-sun-dlj-v1-1       error
sun-java5-bin   shared/present-sun-dlj-v1-1     note
sun-java5-jre   shared/present-sun-dlj-v1-1     note

Save those results (debconf seeds) into a file on the gold server. Then we can modify our jre5 class as follows:

class jre5 {
  package { "sun-java5-jre":
    require      => File["/var/cache/debconf/jre5.seeds"],
    responsefile => "/var/cache/debconf/jre5.seeds",
    ensure       => latest;
  }

  file { "/var/cache/debconf/jre5.seeds":
    source => "puppet:///jre5/jre5.seeds",
    ensure => present;
  }
}

Now our class will download the preseeded answers for the Java license, download and install the JRE, and then use the preseeded answers to skip past the license agreement. I had never messed with debconf seeding previously, since I had either just imaged my systems, or provided config files that would be used when I restarted any daemons or programs that depended on those files. Now debconf-utils is part of my standard system class definition.

Note that this method doesn’t work with the default puppet provided in Debian Etch (version 0.20) — the responsefile parameter for Debian packages was only added in puppet 0.22.

{ 38 } Comments

  1. canon printer error | June 27, 2019 at 3:20 am | Permalink

    It was a wonderfull article,
    If you are not able to get the solution of canon printer error code 5800, then what are you waiting for, to get the proper or complete solution.

    Do Visit us: https://www.printererrorsupport.com/blog/fix-canon-printer-error-code-5800/

  2. Phone Cleaner App | June 28, 2019 at 1:49 am | Permalink

    This information is very helpful. You must look for the Phone Cleaner App
    Visit this https://www.appreviewsbucket.com/blog/tools/advanced-phone-cleaner-app-review/

  3. Phone Cleaner App | June 28, 2019 at 1:50 am | Permalink

    This information is very helpful. You must look for the Phone Cleaner App

  4. final grade calc | June 28, 2019 at 7:54 pm | Permalink

    use our free tool final grade calculator to help you get your final results. https://finalgradecalculator.net

  5. belkin n300 blinking | July 2, 2019 at 7:08 am | Permalink

    follow tutorial, which is based on Belkin instructions, is provided as a courtesy to help you
    https://belkinrangesetup-extender.com/fix-belkin-extender-orange-light/“>

  6. Assignment Help | July 2, 2019 at 11:58 pm | Permalink

    Informative post! You have described all required information for Assignment Help. Due to many reasons, students are not able to write their homework. This information will help all those students to complete their assignment before the due date and will score good marks on their task.

  7. Alex Harry | July 4, 2019 at 2:12 pm | Permalink

    I wrote very valuable information. I hope you will share more post and we Provide support for Antivirus visit at Mcafee Support Number & Norton Helpline Number

  8. Alex Harry | July 4, 2019 at 2:13 pm | Permalink

    I read this post, I loved it. Please share more post.

  9. office.com/setup | July 6, 2019 at 12:52 am | Permalink

    Really impressive post looking forward to see more posts like that keep it up good going

  10. my location now | July 6, 2019 at 12:37 pm | Permalink

    Find where are you right now using our free tool.

  11. ranjit singh | July 8, 2019 at 4:37 am | Permalink

    old school method is good.

  12. Economics Assignment | July 8, 2019 at 6:29 am | Permalink

    Our experts cover all the important topics and related information to it. Do you want to get Economics Assignment Help services online? Then stop searching more, the team of essay makers at StudentsAssignmentHelp.com understand all your requirements and prepare an excellent paper accordingly.

  13. office.com/setup | July 9, 2019 at 12:15 am | Permalink

    To get started with your Microsoft Office Installation we can help you with our entire process to setup office product online.

  14. Singapore translator | July 9, 2019 at 2:15 am | Permalink

    Students often search for translation services because professors of the top university give Singapore translation services to students and students are unable to complete the assignment on time so, they get low grades in college. hired Singapore translators to support students in at the lowest price

  15. ielts Coaching | July 9, 2019 at 2:54 am | Permalink

    I feel happy about and learning more about this topic. keep sharing your information regularly for my future reference. This content creates new hope and inspiration within me. Thanks for sharing an article like this. the information which you have provided is better than another blog.

  16. Assignment help USA | July 9, 2019 at 5:42 am | Permalink

    Students can avail assignment help USA services from the experts of Students Assignment Help and relax from the burden of writing heavy assignments. Students can send their assignment request through WhatsApp at +44-7555369184.

  17. Assignment Help | July 11, 2019 at 5:35 am | Permalink

    Thanks for sharing such informative particulars. All information regarding Assignment Help is mentioned in the post. Anyone who need help for his or her effective project submission, do check greatassignmenthelp for online writing services at affordable prices.

  18. Brother printer supp | July 12, 2019 at 1:57 am | Permalink

    Brother Printers Support team works 24/7 for customer satisfaction related to their damaged
    devices. Reach them via Brother Help Online At Brother Printer Support.

  19. Brother printer supp | July 12, 2019 at 1:58 am | Permalink

    Thanks for sharing such informative particulars.

  20. Brother printer supp | July 12, 2019 at 1:58 am | Permalink

    nice post

  21. dissertationĀ help | July 12, 2019 at 6:24 am | Permalink

    Appreciated for writing such a nice blog I really like the information which is shared in the blog.

  22. jeny | July 15, 2019 at 2:32 am | Permalink

    This is really good for everyone

  23. Avast Login | July 17, 2019 at 12:32 am | Permalink

    Avast Login – Now Login to Avast Account and Access Avast Management Console in order to Manage Services like Subscriptions, Activation etc at my.avast.com”
    http://myavastlogin.com/

  24. officesetup178 | July 17, 2019 at 12:33 am | Permalink

    Office.com/setup – Setup Your Office Retailcard by Entering 25 Digits Office Setup Key on the Website and Install Office Instantly in some Easy Steps.
    office.com/setup

  25. Singapore translator | July 17, 2019 at 1:55 am | Permalink

    Facing a deadline for finishing the project? Well, your anxieties end here. We have with us a team of translate langauge for singapore students who can solve all your translation issues so that you score high grades in your academic. Hurry up, hire our Singapore translators and obtain high quality services.
    https://www.singaporetranslators.com/

  26. Singapore translator | July 17, 2019 at 1:55 am | Permalink

    Facing a deadline for finishing the project? Well, your anxieties end here. We have with us a team of translate langauge for singapore students who can solve all your translation issues so that you score high grades in your academic. Hurry up, hire our Singapore translators and obtain high quality services.
    https://www.singaporetranslators.com/

  27. Singapore translator | July 17, 2019 at 1:55 am | Permalink

    Facing a deadline for finishing the project? Well, your anxieties end here. We have with us a team of translate langauge for singapore students who can solve all your translation issues so that you score high grades in your academic. Hurry up, hire our Singapore translators and obtain high quality services.
    https://www.singaporetranslators.com/

  28. NZ assignment help | July 17, 2019 at 5:22 am | Permalink

    If you are looking for help in your assignment in New Zealand, then you can get it on NZ assignment help from students assignment help.com. Get reliable assignment services in your flexible hours.

  29. office.com/setup | July 18, 2019 at 1:22 am | Permalink

    Wonderful blog! I found it while browsing on Yahoo New
    office.com/setup

  30. Office.com/Setup | July 18, 2019 at 4:29 am | Permalink

    As we know, Microsoft Office is one of the best productivity software available in market right now, Followed by many other software with great possibilities. But Office can perform wonders in many ways. To many people in this world. Working on PC/MAC is really something they do on daily basis, But this computer work should be done easily and fast. And humans always try to work as fast as they can. This is not that easy without softwares. And for businesses and other offices, Productivity softwares have taken the ground to get work done within the time limit or even faster than the given time.

  31. avast number | July 19, 2019 at 2:18 am | Permalink

    Thanks for this blog, I really enjoyed reading your post.
    malwarebytes tech support phone number

  32. McAfee.com/Activate | July 19, 2019 at 4:33 pm | Permalink

    Installing the McAfee antivirus is not a rocket science activity. You need a product key and the right installation process. If you follow the right installation steps, then it will take only few minutes. You can get the product from mcafee.com/activate along with the product key. You can take expert assistance to install the antivirus in the right way.

  33. hanry smith | July 19, 2019 at 4:34 pm | Permalink

    Installing the McAfee antivirus is not a rocket science activity. You need a product key and the right installation process. If you follow the right installation steps, then it will take only few minutes.

  34. hanry smith | July 19, 2019 at 4:35 pm | Permalink

    cAfee featured with many advanced features those give you better security than another security software along with maintaining the good performance of your system. McAfee is only one of the antivirus software that scans your whole system within a few minutes while scanning it does not slow down your system. To enjoy all of the advanced security and utility features of McAfee antivirus, you have to activate your McAfee retail card or product. Here, McAfee offers you two activate method those make the activation process is more simple than another one.

  35. office.com/myaccount | July 20, 2019 at 3:50 am | Permalink

    http://Www.Office.Com/Myaccount Main Issue: Resolving common installation issues using Microsoft

    resources Activation Issues Connection Issues Operating System Issues SOLUTION: Resolving

    basic establishment issues utilizing Microsoft resources This guide bargains particularly

    with Microsoft Office forms 2013 and 365…

  36. Gclub | July 21, 2019 at 10:44 pm | Permalink

    Good post i am pretty much pleased with your good post.You put really very helpful information

  37. Gclub-Royal1688 | July 21, 2019 at 10:52 pm | Permalink

    This is really an amazing and thank you so much for sharing

  38. Windows Movie maker | July 22, 2019 at 2:29 am | Permalink

    Windows movie maker upgraded pro version is available to buy online.

Post a Comment

Your email is never published nor shared. Required fields are marked *