Let me clairify, i didn't say to add any interaction, thats totaly
contrary to the basic concept of rpm. Jean-Michel needs to inform the
admin that it's not fully setup yet, kpackage gnorpm and others do not
show the echos from a %post. Lots of packages need to be configured on a
site by site basis, echoing "Hey add your servers IP to /etc/foo.cfg" in a
%post is a good way to let the admin know about it without sending them
diggin thru 2Mb's of text. 

On Fri, 27 Aug 1999, Stefan Siegel wrote:

> Axalon Bloodstone wrote:
> > On Fri, 27 Aug 1999, Jean-Michel Dault wrote:
> > > Hello,
> > >
> > > I have a few packages that would require an interactive post-install
> > > script. For example, MySQL could ask for the database password to
> > > create, Frontpage could ask for the name of a virtual host. Some
> > > packages, like Postgresql, should ask the user if it should create the
> > > sample database, etc...
> > >
> > > I haven't found the perfect way to do it yet. Assuming defaults is very
> > > dangerous regarding security when it comes to passwords, and we all know
> > > the PITA we had with Postgresql over-writing a poor user's database when
> > > upgrading.
> > >
> > > Right now, I solve the problem by creating a script (eg:
> > > /root/install-frontpage.sh) and echoing a message for the user. But with
> > > gnorpm or kdepackage, you don't see it.

if [ -z $DISPLAY ] ; then
  echo "Run /root/install-frontpage.sh , To Personlize your Frontpage configuration"
else 
  if [ -x /usr/X11R6/bin/xmessage ]; then
  xmessage "Run /root/install-frontpage.sh , To Personlize your Frontpage 
configuration"
  else
    for i in `w|grep root|awk '{print $2}'` ; do 
     echo -e "Run /root/install-frontpage.sh , To Personlize your Frontpage 
configuration\n" \
     > /dev/$i ; done 
  fi
fi      

> > > What would be great is a special attribute to the %post section,
> > > something like "%post --interactive" that could start an xterm or pause
> > > the execution of rpm while the script asks for the information and
> > > configures the package.
> > >
> > > Maybe there is a better solution. If any of you has an idea,  just let
> > > me know.
> 
> Why not set a random password and sent it via mail to root?
> 
> > I don't much like the idea of interactive posts, but hey i can see the
> > need here i'm not blind. Why not just check for a $DISPLAY and pop up an
> > xterm?
> No no, don't do that please reat the thread 
> 
>   User input on post install script
> 
> on
> 
>   http://linuxwww.db.erau.edu/mail_archives/rpm-list/Aug_99/
> 
> here some important mails:
> 
>   http://linuxwww.db.erau.edu/mail_archives/rpm-list/Aug_99/0148.html
>   http://linuxwww.db.erau.edu/mail_archives/rpm-list/Aug_99/0165.html
>   http://linuxwww.db.erau.edu/mail_archives/rpm-list/Aug_99/0167.html
> 
> 

--
MandrakeSoft          http://www.mandrakesoft.com/
                                        --Axalon

Reply via email to