Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The test of intelligent tinkering is to save all the parts. -- Aldo Leopold


computers / comp.sys.tandem / How to call OSS script from TACL script

SubjectAuthor
* How to call OSS script from TACL scriptINDRANIL CHAKRABORTY
+* Re: How to call OSS script from TACL scriptred floyd
|`* Re: How to call OSS script from TACL scriptred floyd
| `* Re: How to call OSS script from TACL scriptINDRANIL CHAKRABORTY
|  `* Re: How to call OSS script from TACL scriptred floyd
|   `- Re: How to call OSS script from TACL scriptKeith Dick
`* Re: How to call OSS script from TACL scriptBill Honaker
 `- Re: How to call OSS script from TACL scriptred floyd

1
How to call OSS script from TACL script

<e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=473&group=comp.sys.tandem#473

 copy link   Newsgroups: comp.sys.tandem
X-Received: by 2002:a05:600c:4e8e:b0:3a0:4f43:beb6 with SMTP id f14-20020a05600c4e8e00b003a04f43beb6mr6568775wmq.176.1656418788083;
Tue, 28 Jun 2022 05:19:48 -0700 (PDT)
X-Received: by 2002:a25:37c4:0:b0:669:b013:8264 with SMTP id
e187-20020a2537c4000000b00669b0138264mr19318862yba.40.1656418787268; Tue, 28
Jun 2022 05:19:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.tandem
Date: Tue, 28 Jun 2022 05:19:46 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=202.8.115.112; posting-account=TiK_qAoAAACD1c9hSLTzDB7YOgUB_D1g
NNTP-Posting-Host: 202.8.115.112
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
Subject: How to call OSS script from TACL script
From: indranil...@gmail.com (INDRANIL CHAKRABORTY)
Injection-Date: Tue, 28 Jun 2022 12:19:48 +0000
Content-Type: text/plain; charset="UTF-8"
 by: INDRANIL CHAKRABORTY - Tue, 28 Jun 2022 12:19 UTC

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

Re: How to call OSS script from TACL script

<t9f8br$14dho$2@redfloyd.dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=475&group=comp.sys.tandem#475

 copy link   Newsgroups: comp.sys.tandem
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!reader01.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam....@its.invalid (red floyd)
Newsgroups: comp.sys.tandem
Subject: Re: How to call OSS script from TACL script
Date: Tue, 28 Jun 2022 08:56:42 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <t9f8br$14dho$2@redfloyd.dont-email.me>
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Jun 2022 15:56:43 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="034495fde428e5d391ea606209249dc4";
logging-data="1193528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Dfis1pYWC7lB+gV/RC5qhbFpX5S6ht3U="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:Ter4rWYICrOnhdubJ9Xth3jbZIY=
In-Reply-To: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
Content-Language: en-US
 by: red floyd - Tue, 28 Jun 2022 15:56 UTC

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"

Re: How to call OSS script from TACL script

<veqmbh91eabsl01nmnhm0jrslf5742gdjp@4ax.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=477&group=comp.sys.tandem#477

 copy link   Newsgroups: comp.sys.tandem
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
From: no_spam_...@x_i_d.com (Bill Honaker)
Newsgroups: comp.sys.tandem
Subject: Re: How to call OSS script from TACL script
Organization: XID, Ltd.
Message-ID: <veqmbh91eabsl01nmnhm0jrslf5742gdjp@4ax.com>
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
X-Newsreader: Forte Agent 6.00/32.1186
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 25
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Tue, 28 Jun 2022 15:53:22 -0500
X-Received-Bytes: 1675
 by: Bill Honaker - Tue, 28 Jun 2022 20:53 UTC

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

Re: How to call OSS script from TACL script

<t9g1qo$176vr$1@redfloyd.dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=478&group=comp.sys.tandem#478

 copy link   Newsgroups: comp.sys.tandem
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!reader01.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam....@its.invalid (red floyd)
Newsgroups: comp.sys.tandem
Subject: Re: How to call OSS script from TACL script
Date: Tue, 28 Jun 2022 16:11:18 -0700
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <t9g1qo$176vr$1@redfloyd.dont-email.me>
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
<veqmbh91eabsl01nmnhm0jrslf5742gdjp@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Jun 2022 23:11:20 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="bee8a4ec62b6440ea3f3acf81f7b60c3";
logging-data="1285115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1995kwF0gQdYMUJRab9XGgP44g/14OzRgU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:gIT9bwjBj5Lo5KzTDqYaWAbE+5M=
In-Reply-To: <veqmbh91eabsl01nmnhm0jrslf5742gdjp@4ax.com>
Content-Language: en-US
 by: red floyd - Tue, 28 Jun 2022 23:11 UTC

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.

Re: How to call OSS script from TACL script

<t9g1ss$176vr$2@redfloyd.dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=479&group=comp.sys.tandem#479

 copy link   Newsgroups: comp.sys.tandem
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!reader01.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam....@its.invalid (red floyd)
Newsgroups: comp.sys.tandem
Subject: Re: How to call OSS script from TACL script
Date: Tue, 28 Jun 2022 16:12:27 -0700
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <t9g1ss$176vr$2@redfloyd.dont-email.me>
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
<t9f8br$14dho$2@redfloyd.dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Jun 2022 23:12:28 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="bee8a4ec62b6440ea3f3acf81f7b60c3";
logging-data="1285115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LGIqXl4iRXzLrzKy82617RVuCxX8Cui8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:hjSw+GPwN0HOVNHb0ZP+4/xRe9g=
In-Reply-To: <t9f8br$14dho$2@redfloyd.dont-email.me>
Content-Language: en-US
 by: red floyd - Tue, 28 Jun 2022 23:12 UTC

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.

Re: How to call OSS script from TACL script

<058e206c-d487-43ee-8452-4d9e7b613dfen@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=481&group=comp.sys.tandem#481

 copy link   Newsgroups: comp.sys.tandem
X-Received: by 2002:a5d:4d12:0:b0:21b:88ac:9250 with SMTP id z18-20020a5d4d12000000b0021b88ac9250mr2977426wrt.136.1656506656134;
Wed, 29 Jun 2022 05:44:16 -0700 (PDT)
X-Received: by 2002:a05:6902:c5:b0:669:1646:b07 with SMTP id
i5-20020a05690200c500b0066916460b07mr3275715ybs.553.1656506655314; Wed, 29
Jun 2022 05:44:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.tandem
Date: Wed, 29 Jun 2022 05:44:15 -0700 (PDT)
In-Reply-To: <t9g1ss$176vr$2@redfloyd.dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=202.8.115.112; posting-account=TiK_qAoAAACD1c9hSLTzDB7YOgUB_D1g
NNTP-Posting-Host: 202.8.115.112
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
<t9f8br$14dho$2@redfloyd.dont-email.me> <t9g1ss$176vr$2@redfloyd.dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <058e206c-d487-43ee-8452-4d9e7b613dfen@googlegroups.com>
Subject: Re: How to call OSS script from TACL script
From: indranil...@gmail.com (INDRANIL CHAKRABORTY)
Injection-Date: Wed, 29 Jun 2022 12:44:16 +0000
Content-Type: text/plain; charset="UTF-8"
 by: INDRANIL CHAKRABORTY - Wed, 29 Jun 2022 12:44 UTC

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

Re: How to call OSS script from TACL script

<t9i0l5$1g3qh$1@redfloyd.dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=483&group=comp.sys.tandem#483

 copy link   Newsgroups: comp.sys.tandem
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!eternal-september.org!reader01.eternal-september.org!redfloyd.dont-email.me!.POSTED!not-for-mail
From: no.spam....@its.invalid (red floyd)
Newsgroups: comp.sys.tandem
Subject: Re: How to call OSS script from TACL script
Date: Wed, 29 Jun 2022 10:03:32 -0700
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <t9i0l5$1g3qh$1@redfloyd.dont-email.me>
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
<t9f8br$14dho$2@redfloyd.dont-email.me>
<t9g1ss$176vr$2@redfloyd.dont-email.me>
<058e206c-d487-43ee-8452-4d9e7b613dfen@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 29 Jun 2022 17:03:33 -0000 (UTC)
Injection-Info: redfloyd.dont-email.me; posting-host="bee8a4ec62b6440ea3f3acf81f7b60c3";
logging-data="1576785"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196NBudKHkDtjwGOpgx9UbOXJwKZ1j5S7Y="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:o3CNgomHfyyaV91ad2GMrGqgh0A=
Content-Language: en-US
In-Reply-To: <058e206c-d487-43ee-8452-4d9e7b613dfen@googlegroups.com>
 by: red floyd - Wed, 29 Jun 2022 17:03 UTC

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.

Re: How to call OSS script from TACL script

<7eaab0c3-e7cb-4635-95e3-7ebd4180da1an@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=485&group=comp.sys.tandem#485

 copy link   Newsgroups: comp.sys.tandem
X-Received: by 2002:a5d:514d:0:b0:21b:932b:be77 with SMTP id u13-20020a5d514d000000b0021b932bbe77mr5168335wrt.231.1656543389304;
Wed, 29 Jun 2022 15:56:29 -0700 (PDT)
X-Received: by 2002:a81:4ed0:0:b0:31b:a0f1:31bd with SMTP id
c199-20020a814ed0000000b0031ba0f131bdmr7008939ywb.22.1656543388866; Wed, 29
Jun 2022 15:56:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.tandem
Date: Wed, 29 Jun 2022 15:56:28 -0700 (PDT)
In-Reply-To: <t9i0l5$1g3qh$1@redfloyd.dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=98.42.228.104; posting-account=Lua_ZwoAAADivbVXQF8uKE7dZSUNm9vj
NNTP-Posting-Host: 98.42.228.104
References: <e3846073-6c9f-4f7d-ad37-0367133275f1n@googlegroups.com>
<t9f8br$14dho$2@redfloyd.dont-email.me> <t9g1ss$176vr$2@redfloyd.dont-email.me>
<058e206c-d487-43ee-8452-4d9e7b613dfen@googlegroups.com> <t9i0l5$1g3qh$1@redfloyd.dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7eaab0c3-e7cb-4635-95e3-7ebd4180da1an@googlegroups.com>
Subject: Re: How to call OSS script from TACL script
From: rkd...@gmail.com (Keith Dick)
Injection-Date: Wed, 29 Jun 2022 22:56:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Keith Dick - Wed, 29 Jun 2022 22:56 UTC

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.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor