|
When you pbrun into a different account a new login script is executed because of which it waits for at the command prompt. The commands in your main script will be executed after you manually exit from this login script.
Here is how I solved the problem for myself:
1. In my main script I created a zero-length temporary file at a predetermined location (I tried exporting variables to the new login script but that does not work)
2. In the .profile of the new user account I check if this file exists and execute the required commands and delete the temporary file
thus if you pbrun to that user from the command prompt this file won't be there so your commands won't be executed.
you could have a problem though if multiple users are pbrunning into that account at the same time as you are executing your script.
Hope this helps.
|