• How to call OSS script from TACL script

    From INDRANIL CHAKRABORTY@21:1/5 to All on Tue Jun 28 05:19:46 2022
    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From red floyd@21:1/5 to INDRANIL CHAKRABORTY on Tue Jun 28 08:56:42 2022
    On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    osh / ... / -c "echo y | sh /home/..../restart"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to INDRANIL CHAKRABORTY on Tue Jun 28 15:53:22 2022
    On Tue, 28 Jun 2022 05:19:46 -0700 (PDT), INDRANIL CHAKRABORTY <indranilcha@gmail.com> wrote:

    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    As with most anything, there are lots of ways. Red's idea works. You could also create a text file (OSS or Guardian) with a single line in it with a 'Y'.

    Then:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </path/to/yesfile.txt
    or
    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvolyesfile

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From red floyd@21:1/5 to Bill Honaker on Tue Jun 28 16:11:18 2022
    On 6/28/2022 1:53 PM, Bill Honaker wrote:
    On Tue, 28 Jun 2022 05:19:46 -0700 (PDT), INDRANIL CHAKRABORTY <indranilcha@gmail.com> wrote:

    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" >>
    This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    As with most anything, there are lots of ways. Red's idea works. You could also create a text file (OSS or Guardian) with a single line in it with a 'Y'.

    Then:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </path/to/yesfile.txt
    or
    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvolyesfile

    Oh, definitely, Bill. I was just trying to avoid a temp file that would
    need be cleaned up later.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From red floyd@21:1/5 to red floyd on Tue Jun 28 16:12:27 2022
    On 6/28/2022 8:56 AM, red floyd wrote:
    On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give
    the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh
    /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without
    human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    osh / ... / -c "echo y | sh /home/..../restart"

    There is an error in this code. Correct is:

    osh / ... / -c "echo y ~| sh /home/.../restart"

    The ~ is needed to escape the pipe symbol, which
    is a TACL metacharacter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From INDRANIL CHAKRABORTY@21:1/5 to red floyd on Wed Jun 29 05:44:15 2022
    On Wednesday, June 29, 2022 at 4:42:29 AM UTC+5:30, red floyd wrote:
    On 6/28/2022 8:56 AM, red floyd wrote:
    On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give
    the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh
    /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without
    human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    osh / ... / -c "echo y | sh /home/..../restart"
    There is an error in this code. Correct is:

    osh / ... / -c "echo y ~| sh /home/.../restart"

    The ~ is needed to escape the pipe symbol, which
    is a TACL metacharacter.
    Hello Sir,

    I have used the both the below commands:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvol/yesfile
    osh / ... / -c "echo y ~| sh /home/.../restart"

    it is working for other files but for restart it is throwing the below error:

    Do you wish to continue? (y/[n]): httpd: (#216) configuration script 'httpd.config' failed
    not a tty
    child process exited abnormally

    It only stops the pathmon $PQRS but, does not start that. Throwing the above error.
    Please suggest.

    Thanks,
    Indranil

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From red floyd@21:1/5 to INDRANIL CHAKRABORTY on Wed Jun 29 10:03:32 2022
    On 6/29/2022 5:44 AM, INDRANIL CHAKRABORTY wrote:
    On Wednesday, June 29, 2022 at 4:42:29 AM UTC+5:30, red floyd wrote:
    On 6/28/2022 8:56 AM, red floyd wrote:
    On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
    Hello All,

    I am trying to prepare a TACL script which will call an OSS script.
    But, That OSS script asks for consent (Y/N) to run. So how I can give
    the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh
    /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without >>>> human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    osh / ... / -c "echo y | sh /home/..../restart"
    There is an error in this code. Correct is:

    osh / ... / -c "echo y ~| sh /home/.../restart"

    The ~ is needed to escape the pipe symbol, which
    is a TACL metacharacter.
    Hello Sir,

    I have used the both the below commands:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvol/yesfile
    osh / ... / -c "echo y ~| sh /home/.../restart"

    it is working for other files but for restart it is throwing the below error:

    Do you wish to continue? (y/[n]): httpd: (#216) configuration script 'httpd.config' failed
    not a tty
    child process exited abnormally

    It only stops the pathmon $PQRS but, does not start that. Throwing the above error.
    Please suggest.

    Thanks,
    Indranil

    OK, it looks like it's trying to read directly from the terminal, not
    from standard input. You may need to use the temp file, and use the
    /TERM xxx/ option to the OSH command.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to red floyd on Wed Jun 29 15:56:28 2022
    On Wednesday, June 29, 2022 at 10:03:35 AM UTC-7, red floyd wrote:
    On 6/29/2022 5:44 AM, INDRANIL CHAKRABORTY wrote:
    On Wednesday, June 29, 2022 at 4:42:29 AM UTC+5:30, red floyd wrote:
    On 6/28/2022 8:56 AM, red floyd wrote:
    On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
    Hello All,

    I am trying to prepare a TACL script which will call an OSS script. >>>> But, That OSS script asks for consent (Y/N) to run. So how I can give >>>> the consent "Y" automatically from the script?

    I am using the below command:

    osh /jobid 1/-osstty -c "sh
    /home/xxxxxx.mgr/soapservices/xxx/conf/restart"

    This is, asking for Y/N to run. I want to give Y automatically without >>>> human intervention. As it will run from Netbatch.

    Can anyone help on this please.

    Thanks,
    Indranil

    osh / ... / -c "echo y | sh /home/..../restart"
    There is an error in this code. Correct is:

    osh / ... / -c "echo y ~| sh /home/.../restart"

    The ~ is needed to escape the pipe symbol, which
    is a TACL metacharacter.
    Hello Sir,

    I have used the both the below commands:

    osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvol/yesfile
    osh / ... / -c "echo y ~| sh /home/.../restart"

    it is working for other files but for restart it is throwing the below error:

    Do you wish to continue? (y/[n]): httpd: (#216) configuration script 'httpd.config' failed
    not a tty
    child process exited abnormally

    It only stops the pathmon $PQRS but, does not start that. Throwing the above error.
    Please suggest.

    Thanks,
    Indranil
    OK, it looks like it's trying to read directly from the terminal, not
    from standard input. You may need to use the temp file, and use the
    /TERM xxx/ option to the OSH command.

    My memory might be wrong, but I believe that TERM only accepts real terminals, pseudo-terminals (like telnet creates), and processes. I believe it won't accept a disk file.

    An alternate to try, if TERM with a disk file does not work, would be to write a program that opens its $RECEIVE file, reads from it, looking for a prompt, and replying with the text to be sent to the program whose action you are trying to automate. I
    believe you can find an example of such a program in the Guardian Programming manual. It is not a very difficult program to create for someone moderately experienced with server programming, but there are some details that you need to know, which that
    manual should explain -- particularly how to make the process receive the DEVICEINFO message and respond to it in the way to make it masquerade as a terminal.

    When you have such a program working, you would run it as a named process before trying to run the restart, and give that process name as the name following TERM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)