?
Solved

Solaris Packg Translation Problem

Posted on 1997-04-19
2
Medium Priority
?
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating 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.:
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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