Operating System - HP-UX
1752815 Members
6444 Online
108789 Solutions
New Discussion юеВ

Re: Problem with request script in swask OR swinstall

 
SOLVED
Go to solution
Nagendar
Advisor

Problem with request script in swask OR swinstall

Hi,

To start with, I have a simple request script, which reads a variabe from user. Just to add, my depot is in defaulr dir i.e, /var/spool/sw.

I am getting the following error.


# rw-rw-rw- 106/20 339 Nov 27 19:15 2002 icons/world2.png
bash: rw-rw-rw-: command not found
# swask -s /var/spool/sw \*

======= 12/18/02 14:38:24 MST BEGIN swask SESSION (non-interactive)

* Session started for user "root@lothar".

* Beginning Selection
* Target connection succeeded for "lothar:/".
* Source connection succeeded for "lothar:/var/spool/sw".
* Software bin has a "request" script. It will be executed and
corresponding "response" file will be generated.

Inside request script ... ... ...
Please enter the name
test
* Ask task succeeded.

ERROR: File "/var/tmp/BAAa24520/catalog/IFS/bin/response": No such
file or directory (2). Cannot copy it to file
"/var/spool/sw/catalog/IFS/bin/response".

======= 12/18/02 14:38:27 MST END swask SESSION (non-interactive)


Please help!

With best regards,
Nagendar
14 REPLIES 14
T G Manikandan
Honored Contributor

Re: Problem with request script in swask OR swinstall

check this


#swask -s
-x ask=as_needed \*

as the command can create a response file for you.


Thanks
Nagendar
Advisor

Re: Problem with request script in swask OR swinstall

Hi Mani,

The default ask option for swask is true. So, the suggested change will not have any effect. Though I tried it, same error is encountered.

Any other suggetions? Something silly happening I guess.

Any help is highly appreciated, as I am really clueless.

Thanks,
Nagendar
Nagendar
Advisor

Re: Problem with request script in swask OR swinstall

Hi friends,

Do anyone have any idea what could be wrong, the way I am using swask? Expecting suggetions.

Thanks,
Nagendar
Vincent Stedema
Esteemed Contributor

Re: Problem with request script in swask OR swinstall

Hi,

Try adding the logdetail=true and loglevel=2 options to the command. Maybe this will provide more info on why it's not working.

Regards,

Vincent
Mateja Bezjak
Respected Contributor
Solution

Re: Problem with request script in swask OR swinstall

Hi Nagendar,

swask probably doesn't succeed because the response file wasn't created. Could you please post the request file.
Here is an example of a simple request script that just asks your name and creates the response file:

echo "Please enter your name:"
read name
echo $name > ${SW_CONTROL_DIRECTORY}response

Regards,
Mateja
Mateja Bezjak
Respected Contributor

Re: Problem with request script in swask OR swinstall

Hi Nagendar,

Here is a link to the Software Distributor's Administartion Guide. I think this might help you with the control scripts:
http://docs.hp.com/hpux/onlinedocs/B2355-90754/B2355-90754.html

Have a look at chapter "Using Control Scripts"

Regards,
Mateja
Nagendar
Advisor

Re: Problem with request script in swask OR swinstall

Hi Mateja,

Thanks a lot. It really solved my problem.
Actually, I was thinking that response file gets generated by SW. But, I realized we need to write to it explicitly. That solves the problem!

Just a additional query I have:
When I run the same script through swinstall by ask option,

I get this error:

Please enter the name
test
* Ask task succeeded.

* Source: /var/spool/sw
* Targets: lothar:/home/isswork/nags
* Software selections:
IFS.bin
IFS.library
* Selection succeeded.


* Beginning Analysis
* Session selections have been saved in the file
"/var/adm/sw/sessions/swinstall.last".
ERROR: Could not access remote file "GLOBAL_INDEX" in software item
"". The file could not be found on the remote system.
ERROR: There is currently no installed software on host "lothar" at
location "/home/isswork/nags". (Note that you need to use
"swcopy" to manage depot software).
* Analysis had errors.
-----------------------------------------------


Any idea? But, it's not hard and fast. I can manage through swask too. But, just to know whats wrong.

Thnaks,
Nagendar
Mateja Bezjak
Respected Contributor

Re: Problem with request script in swask OR swinstall

Hi Nagendar,

I am glad your problem is solved.
As for the "GLOBAL_INDEX" error. You get it because you are installing to an alternate root. swinstall is looking for the INDEX file in /home/isswork/nags/var/adm/sw/products/INDEX. But INDEX there doesn't exist. You could run the same command without "-x ask=true" first to install the product (this will create an INDEX file at the above mentioned location) and then rerun swinstall:
swinstall -x reinstall=true -x ask=true IFS @ /home/isswork/nags

I hope this helps. Regards,
Mateja
Mateja Bezjak
Respected Contributor

Re: Problem with request script in swask OR swinstall

Hi Nagendar,

This is weird, because I have no problem reinstalling the product. swinstall asks for response. Have you included "-x ask=true" in the command line?
btw, I am using the sample request script I posted earlier.

Mateja