2 Replies Latest reply: Jan 30, 2014 9:04 AM by Oracle_DBA_99 RSS

    ./emocmrsp

    Oracle_DBA_99

      I'm trying to automate the running of this script.

       

      ./emocmrsp

       

      This creates a response file in $ORACLE_HOME/OPatch/ocm/bin to be used while running a quarterly patch update in auto mode.

       

      The script ./emocmrsp is run when upgrading to the latest Opatch version.

       

      ./emocmrsp

       

      I'm trying to write a program to automate the opatch ugrade.

       

      I've tried a few things and nothing is working.

       

      The script prompts for an Email address and I press enter to to get past that.

       

      Then it asks for

       

       

      Email address/User Name: << Enter nothing.

       

      Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: <<<Enter Y

       

       

       

      When I run this:

       

      (echo ; echo Y)| ./emocmrsp

       

      I get:

      Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Invalid value specified.

       

       

       

      When I run this:

      ./emocmrsp <<EOF

       

       

      Y

      EOF

       

      I get the same error:

       

      Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Invalid value specified.

       

       

      Any suggestions?

        • 1. Re: ./emocmrsp
          1147721

          Hello,

          you could use expect for that. The expect script could be something like :

           

           

          #!/usr/bin/expect -f

          spawn ./emocmrsp

          expect {

          "Email address/User Name:"

            {

             send "\n"

             exp_continue

            }

            "Do you wish to remain uninformed of security issues*"

            {

             send "Y\n"

             exp_continue

            }}

           

           

          You store it as createocm.exp and run it, it should be executable and you should have expect installed

           

           

          $ ./createocm.exp

          spawn ./emocmrsp

          OCM Installation Response Generator 10.3.1.1.0 - Production

          Copyright (c) 2005, 2009, Oracle and/or its affiliates.  All rights reserved.

           

          Provide your email address to be informed of security issues, install and

          initiate Oracle Configuration Manager. Easier for you if you use your My

          Oracle Support Email address/User Name.

          Visit http://www.oracle.com/support/policies.html for details.

          Email address/User Name:

           

          You have not provided an email address for notification of security issues.

          Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y

          The OCM configuration response file (ocm.rsp) was successfully created.

          • 2. Re: ./emocmrsp
            Oracle_DBA_99

            This worked wonderfully.

             

            Thank you