![]() |
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question on install software package on Linux | cy163 | UNIX for Dummies Questions & Answers | 1 | 06-09-2008 05:03 AM |
| looking for ImageMagick install package | mickeymouse | UNIX and Linux Applications | 2 | 05-30-2008 09:30 AM |
| install and uninstall package | anhtt | SUN Solaris | 1 | 05-10-2008 04:20 AM |
| how to install package | amitarcade | SUN Solaris | 2 | 01-23-2008 05:56 PM |
| uninstall and install a package | big123456 | UNIX for Dummies Questions & Answers | 6 | 01-19-2007 10:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I wrote a post-install script, which is executed after the package installation by command like " pkgadd -d /mypackage.pkg".
I also want to read user input in post-install script as follows: Code:
while [ "$ANSWER" != "y" -a "$ANSWER" != "n" ] ;
do
echo "Apply changes to database? [y/n]:"
read ANSWER
done
Code:
Apply changes to database? [y/n]: Apply changes to database? [y/n]: Apply changes to database? [y/n]: Apply changes to database? [y/n]: Apply changes to database? [y/n]: ... |
|
||||
|
I'm not familiar with pkgadd but it looks like it's running the script with input redirected from /dev/null. The recommendation for package installation scripts is to avoid user interaction, anyway. I'd suggest you avoid this dialog altogether; if it's absolutely necessary, I'm imagining the pkgadd documentation will have suggestions for how to properly engage the administrator in a dialogue (probably even before this script runs).
|
|
||||
|
Thanks era.
I went through pkgadd and pkgmk documentation and got no answer for this, unfortunately! After disucssion with my colleague, we came up with an idea - read the user input from a jar then return to shell script. It works! |
|
||||
|
My mistake! It still doesn't work!
According to Solaris packaging documentation, the only place, which the installer can solicit user input, is through "request script". That's a stage far before post-install. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|