11 Replies Latest reply: Dec 4, 2009 4:27 PM by 807567 RSS

    wget  issue

      Is there any way you can download the Solaris10_recommended using wget from a terminal. I am trying to update a remote host using ssh to pull off the last solaris10_recommended file. I can download the 1Gb+ file locally if I visisted the host,and then FTP on the local network, but I would prefer to do this remotely. Obviously I need to update via single user, but would be interested if I can initially update using wget (or any other tool) from the shell/temrinal, thanks in advance
        • 1. Re: wget  issue

          You can use wget to automate the download of the recommended patch cluster in much the same way as you can use it to automate the download of a patch.

          The syntax to use is:
          wget no-check-certificate http-user="<SOA_USERNAME>" --http-passwd="<SOA_PASSWD>" "http://sunsolve.sun.com/pdownload.do?target=10_Recommended&method=h" -O /tmp/10_Recommended.zip

          SOA_USERNAME/SOA_PASSWD are your Sun Online Account username & password.
          /tmp/10_Recommended.zip is the location you wish to download the patch cluster to.

          1) The above example is for wget version 1.10.2. If you are using wget version 1.11.x (or later) the "--auth-no-challenge" option must be used. Further info on using wget to download from SunSolve is available at http://sunsolve.sun.com/search/document.do?assetkey=1-9-240066-1.
          2) You must have a valid support contract in order to download the Solaris 10 Recommended Patch Cluster.
          • 2. Re: wget  issue
            Many thanks for this, regards

            • 3. Re: wget  issue
              thanks for the wget line! it seems this is the right one.

              Unfortunately, it first links to an "agreement" page : do you know how i could automate the "accept" on that one?

              (ie, a first wget, "some way to accept the agreement", and then a second wget to retrieve the actual file...)

              Thanks a lot in advance (I try to do it myself, but as to now i couldn't figure out how to "accept")
              • 4. Re: wget  issue
                I am also experiencing problems with accepting the license agreement. I tired going to the patch description in a browser so that I had the "accept" in my cookies file for the browser, and then referring to the cookies file when running wget (--load-cookies file), but still nothing. The wget stops at the license agreement. How does one get past that?
                • 5. Re: wget  issue
                  I use the following bash function:
                  getpatch ()
                      /usr/sfw/bin/wget -c --user=${1} --password=${2} --no-check-certificate http://sunsolve.sun.com/pdownload.do?target=${3}\&method=h
                  Which allows me to do things like:
                  # getpatch [username] [password] [what I want from sunsolve]
                  # getpatch [username] [password] 10_Recommended.zip
                  # getpatch [username] [password] 8_SunAlert_Patch_Cluster.zip
                  # getpatch [username] [password] 123456
                  # getpatch [username] [password] 123456-13
                  So that function allows you to easily grab R&S clusters, Sun Alert clusters, the latest rev of a patch or any specific rev of a patch.

                  If you need a proxy:
                  getpatch ()
                      http_proxy=proxy.foo.com:8080 /usr/sfw/bin/wget -c --user=${1} --password=${2} --no-check-certificate http://sunsolve.sun.com/pdownload.do?target=${3}\&method=h
                  • 6. Re: wget  issue
                    I have tried just manually running wget from the command line with the same options you outline below, but I get the same results: a file with the HTML code for the license accept screen in it. I can't seem to get past that step. I am using wget version 1.11, which is very recent, so I don't believe that is the issue. So I am at a loss. Why does it work for you, but the exact same expression fails for me? There is something going on underneath the covers that we are missing here and that something is causing my session to be intercepted and redirected to the license screen.
                    • 7. Re: wget  issue
                      You need a Sun Online account, and you need to manually accept the license via a browser. Then you'll be able to use wget.
                      • 8. Re: wget  issue
                        I have a Sun Online account, and have had it for more than a decade. I have accepted the license many, many times. In fact, I am forced to accept it every time I access the page. But if I accept the page with my browser, how does wget "know" that without reading the browser's cookies, unless the "accept" is stored at the servers side, not in the cookie file? I have tried pointing wget at my browser's cookie file with the "--load-cookies" argument, but that didn't help. Is there something wrong with my account? Should I need to accept only once and the Sun Online system remembers that forever after that?
                        • 9. Re: wget  issue

                          I have a problem while trying to download the patches using wget. I don't have any zip after download, I only have a file with 0 lenght. Can anyone help me?

                          I have a paid account, for being able to download patches, I can download them with Firefox, from a Windows machine. I want to download them from a linux server, with wget.

                          The error I get is:

                          --07:58:37-- http://sunsolve.sun.com/pdownload.pl?target=10_x86_Recommended&method=h
                          Resolving sunsolve.sun.com...
                          Connecting to sunsolve.sun.com||:80... connected.
                          HTTP request sent, awaiting response... 302 Moved Temporarily
                          Location: http://sunsolve.sun.com/pdownload.do?target=10_x86_Recommended&method=h [following]
                          --07:58:37-- http://sunsolve.sun.com/pdownload.do?target=10_x86_Recommended&method=h
                          Reusing existing connection to sunsolve.sun.com:80.
                          HTTP request sent, awaiting response... 404 Not Found
                          07:58:43 ERROR 404: Not Found.

                          Edited by: stofarius on Nov 11, 2009 5:49 AM
                          • 10. Re: wget  issue
                            I tried like this:

                            wget no-check-certificate http-user="<SOA_USERNAME>" --http-passwd="<SOA_PASSWD>" "http://sunsolve.sun.com/pdownload.do?target=10_Recommended&method=h" -O /tmp/10_Recommended.zip

                            and I replaced with my user and password but it didn't worked. Can someone help me please?

                            Thank you in advance!
                            • 11. Re: wget  issue
                              If you are willing to download patches by themselves (as opposite to the recommended package) I would suggest to use pca and let it figure out which patches are needed for your machine.