Solved

Solaris Packg Translation Problem

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

759 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now