?
Solved

Solaris Packg Translation Problem

Posted on 1997-04-19
2
Medium Priority
?
390 Views
Last Modified: 2013-12-16
Why is that I am not able to perform i/o thro a exe file,during the post-install script for SOLARIS pkgtrans ,
routine. It just prints out the prompts with out waiting for the user inputs !
0
Comment
Question by:karpa
2 Comments
 

Accepted Solution

by:
wjg earned 200 total points
ID: 1812048
Have you stated your problem correctly? pkg*trans* is not interactive and does have no postinstall. Do you mean pkg*add*?

If you do: All package procedures, except request, are designed
to be non-interactive! See Solaris package documentation in the
AnswerBook.

Solaris (as opposed to other SV pkg mechanisms) enforces this by redirecting stdin from /dev/null. This explains the behaviour of your programs (or a shell read): Reading EOF the read(s) return right away with nothing read.

[[ The design rationale is that this way the request script can
be run independently of package installation and the answers
produced (or even answers generated by some other mechanism) can than be used to perform non-interactive package installation -
which is really a bonus is you have to do installations on a bulk
of machines. ]]

The only official way to get user input is to negotiate it in the
request script (e.g.: echo "Huh> \c"; read VARIABLE),
store it in the package environment (:= put lines of the form
echo "VARIABLE=\"variable value\" >>$1
in request) and then use the variable values in the postinstall
procedure (e.g. echo "$VARIABLE" | your_program).

You could also write a program that stores larger amounts of
data in a file in /tmp and then pass the filename to postinstall
through a package variable , as described above.

Hope that solves your problem.
Wolf.
0
 

Author Comment

by:karpa
ID: 1812049
The way to get around this problem is more important and the author has not given in a laymans terms,otherwise its good
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month16 days, 18 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question