Sponsored Content
Top Forums Shell Programming and Scripting Package post-install script problem Post 302222948 by kingpmp on Friday 8th of August 2008 02:26:13 AM
Old 08-08-2008
Question Package post-install script problem

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

However, it does NOT pause and wait for user input at all! Instead, it goes into an infinite loop:
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]:
...

Any advice will be appreciated!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

uninstall and install a package

Hi, on Red Hat Enterprise Linux AS release 3 (Taroon). How can I : 1-install a package (exemple : compat-gcc-7.3-2.96.128.src.rpm) 2-uninstall (or delete or deinstall) a package (exemple : compat-gcc-7.3-2.96.122). Many thanks before. (6 Replies)
Discussion started by: big123456
6 Replies

2. Solaris

how to install package

Hi How to install package from Freeware for Solaris Specificaly i want to install lsof-4.77-sol10-sparc-local.gz Thanks Amit (2 Replies)
Discussion started by: amitarcade
2 Replies

3. Solaris

install and uninstall package

I'm a newcomer for Solaris. I tried to install Net::FTP package ( a tool perl ) on our sun server 5.9. We used the below command: /usr/bin/perl MakeFilePL make make install How can I uninstall this package ? (1 Reply)
Discussion started by: anhtt
1 Replies

4. UNIX and Linux Applications

looking for ImageMagick install package

i am struggling to find an error free, and complete install package for ImageMagick (with perl- "PerlMagick"). imagemagick.org not much help.... links for source, mirrors etc dont work. any pointers appreciated. linux server. (2 Replies)
Discussion started by: mickeymouse
2 Replies

5. Solaris

not able to install the package

I am working with sun solaris 9 and I want to install some packages but due to less disk space I am not able to install the packages. I am giving the output of filesystem-- # df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 2148263 1997593 107705 ... (10 Replies)
Discussion started by: smartgupta
10 Replies

6. Solaris

how to install this package

Dears, i am new user in solaris i am using solaris 10 https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=Sol-audio-drivers1.0-x86-G-F@CDS-CDS_SMI after i unzip this package i didn't found any package to install cos i only... (1 Reply)
Discussion started by: sharkux
1 Replies

7. Linux

How install a new package without remove old package?

Dear all, I would like to install a new version of package without remove old version on Centos and vice versa. Please give me advice! thanks much, (2 Replies)
Discussion started by: all4cfa
2 Replies

8. UNIX for Dummies Questions & Answers

Can't install rpm package with --prefix in new path.Error: package is not relocatable

Hello, i have downloaded an rpm package "hadoop-0.20.205.0-1.amd64.rpm" in /usr/local/ directory. I'm trying to install the rpm package in a new path/location (/usr/local/hadoop-0.20.205), but i can't. I did: 1st try: Didn't work sudo rpm -i --prefix=/usr/local/hadoop-0.20.205... (1 Reply)
Discussion started by: g_p
1 Replies

9. Emergency UNIX and Linux Support

Problem when trying to remove a package using rpm command - error: package is not installed

Hello, i have installed a package by using the command sudo rpm -i filepackage.rpm package filepackage is already installed when i try to remove it, i get an error saying "is not installed": sudo rpm -e filepackage.rpm error: package filepackage is not installed How can... (4 Replies)
Discussion started by: g_p
4 Replies

10. Red Hat

faceing problem when i try to install any package!

Hello, When i try to install any package,the following appears: # yum install yum Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Nothing to do # plz guide me asap! ---------- Post... (1 Reply)
Discussion started by: ahmedamer12
1 Replies
GPT-POSTINSTALL(8)					User Contributed Perl Documentation					GPT-POSTINSTALL(8)

NAME
gpt-postinstall - Searches for post install scripts and executes them SYNOPSIS
gpt-postinstall [-help -force -version -man -location ] DESCRIPTION
gpt-postinstall Searches an installation for post-install scripts that have not been run yet and executes them. These scripts are installed by Setup packages and are designed to localize an installation. The -force flag can be used to re-run all of the setup scripts. OPTIONS
-force forces all action to be taken, regardless of state. -help Print a brief help message and exits. -man Prints the manual page and exits. -version Prints the version of GPT and exits. -location Location indicates the path to the Globus installation that will be used. SEE ALSO
gpt-install(1) gpt-uninstall(1) gpt-verify(1) AUTHOR
Michael Bletzinger <mbletzin.ncsa.uiuc.edu> and Eric Blau <eblau.ncsa.uiuc.edu> perl v5.14.2 2012-04-30 GPT-POSTINSTALL(8)
All times are GMT -4. The time now is 06:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy