Solved

Solaris Packg Translation Problem

Posted on 1997-04-19
2
385 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 100 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

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 …
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

828 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