Stew Benedict wrote:

>Are you saying the script behave differently in the RPM than if you just
>run it?  I would do something a little more bulletproof, which would force
>them to answer one of your choices, unless they ctrl-C out of it:
>
>
>  
>
Yes (I am saying the script behave differently).

I used your suggestions, but the result is the same.

If I run sh /var/tmp/rpm-tmp.54377 I have got the promt "Answer (yes | 
no | later)"
If I answer the script goes on as well. It is OK.

But when I run rpm -Uhv I have a loop: Answer (yes | no | later) Answer 
(yes | no | later) Answer (yes | no | later) Answer (yes | no | later) 
Answer (yes | no | later) Answer (yes | no | later) [etc...]

This because of $chiave is empty

GetInput () {
    echo -n "Answer (yes | no | later)";
    read chiave

    while [ -z "$chiave" ]; do
        GetInput
    done;
}


Because of $chiave is empry GetInput is looped.


Miguel Beccari





Reply via email to