Hi,

> I just get user input using,
> 
> $answer = <STDIN>;

Don't do that.

The rpm is great for doing unattended installs - you are
breaking this possibility and that the rpm closes/redirects
the stdin to /dev/null is the only sane thing it can do.

But this leaves another question - is there any possibility
to automagically mark, that there is something that needs
a manual intervention? The way the (for example) PostgreSQL
is doing this in the init script is simply ugly:

  if [ `cat $PGDATA/PG_VERSION` != '7.0' ]
  then
    echo "old version. Need to Upgrade."
    echo "See /usr/doc/postgresql-7.0/README.rpm for more in formation."
    exit 1
  else
    echo "looks good!"
  fi


What I am proposing is something like a script that can
be specified in the rpm, a flag in the rpm database
marking whether this script was run or not and a rpm
flag causing some or all these scripts to be run
in an interactive environment.

In other words, I want some possibility to quickly see,
where I need to do something manually. There are packages
not needing any configuration (even though they possibly
have some %config files), there are ones that need extensive
configuration (and nobody will expect them running out of
the box), but especially when upgrading there is a lot of
things that possibly need to be addressed. I would like to
get this information from the rpm subsystem (and not from
e.g. find / -name \*.rpmsave -o -name \*.rpmorig -print).

Regards
-- 
                                Stano



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to