SU issues

Hi,
I have automated a build process that does the following activities.

  1. check out code from cvs to a specific directory
  2. build the revision checked out with 'ANT'
  3. integrate the compiled code with the QA/UAT or new environment
    (/apps/QA or /apps/UAT or /apps/new directory)

I have separated this into two scripts. The first one does steps 1 and 2 and then calls number 3. The reason that they are separated is that based on permissions steps 1 and 2 can be done only by and individual id while step 3 has to be done by the build user account that owns the integrated environments.

Here is the problem. I made the process interactive using 'select' contructs to allow the user to select different options. After steps 1 and 2 are completed I am executing and 'su' to switch to the build id to integrate the compiled code. However there are options in the second script also. For some reason when I 'su' the shell goes into an infinite loop when I prompt the user for feedback in the second script. It doesn't wait for response. I this the behavior of 'SU'? Is there any way around this? Thank you.

Here's how I su over in the script:

su - $vBuildUser <<-EOF
eval "$unixBuild -s $vSystem -r $vRevision -e $vIntegratedEnvironment"
wait
EOF
exit
exit
1 Like

anyone have any hints, ideas, suggestions?