This is a discussion on oninit via remote shell within the Informix forums, part of the Database Server Software category; --> Hi all, we have 2 servers connected via hdr and i need a script to change the status(primary/secondary) of ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, we have 2 servers connected via hdr and i need a script to change the status(primary/secondary) of these servers. The script consists of local and remote commands(hdrmkpri.sh, hdrmksec.sh , some copy-commands and some tests in the right order) The Problem:if i start a remote shell which contains an oninit-command, all commands in the remote script are executed, but the ssh/rsh command comes not back to the prompt. Example: server2:/usr/ifx/bin/ifx_start: ##################### .. env_ids_10.0 # load informix environment oninit echo "after oninit" ##################### locally started on server2 it works and returns the prompt start on server1: ssh server2 "/usr/ifx/bin/ifx_start" -> all commands of the script are executed .... after oninit ..... the ssh-command has no end, no prompt comes back!!! the original script is more complex, i reduced this to one oninit-command (i think, the problem comes from oninit) Our environment is Solaris and ids 10.0, but I had tests with same results on SUSE-linux 9.1 and IDS 9.40. And i tried rsh ... and ssh ... -> same problems. remote script with onmode works. Do you have any ideas, do you have an explanation?? TIA Ruediger Papke |
| ||||
| I get the solution of my Problem from a IBM guy stdout/stderr of oninit has to be redirected: for example: oninit >/tmp/oninit.out 2>&1 now it works Ruediger ruediger.papke@t-online.de wrote: > Hi all, > we have 2 servers connected via hdr and i need a script to change the > status(primary/secondary) of these servers. > The script consists of local and remote commands(hdrmkpri.sh, > hdrmksec.sh , some copy-commands and some tests in the right order) > The Problem:if i start a remote shell which contains an oninit-command, > all commands in the remote script are executed, but the ssh/rsh command > comes not back to the prompt. > Example: > server2:/usr/ifx/bin/ifx_start: > ##################### > . env_ids_10.0 # load informix environment > oninit > echo "after oninit" > ##################### > locally started on server2 it works and returns the prompt > > start on server1: > ssh server2 "/usr/ifx/bin/ifx_start" > > -> all commands of the script are executed > ... > after oninit > .... > the ssh-command has no end, no prompt comes back!!! > > the original script is more complex, i reduced this to one > oninit-command (i think, the problem comes from oninit) > > Our environment is Solaris and ids 10.0, but I had tests with same > results on SUSE-linux 9.1 and IDS 9.40. > And i tried rsh ... and ssh ... -> same problems. > > remote script with onmode works. > > Do you have any ideas, do you have an explanation?? > > TIA > > Ruediger Papke |