Problem with expect launched by remote pc
Hi guys,
I have a big problem.
I have a expect file (called migrate.sh) code like this:
#!/usr/bin/expect -f
set timeout -1
spawn xl migrate VM 192.168.1.3
expect "password:"
send "pass"
interact
(this code is trying to migrate a virtual machine from a host to another one)
if I launch ./migrate.sh it works great
then, I have a C file (called test), and inside of it I have something like
if (//reading by file) {
execl ("/root/migrate.sh",0);
}
with reading by file I mean that there is a file in which a remote PC send a signal who orders to launch the migrate.sh
When the remote PC writes the order "MIGRATE", the first host accepts the signal, launches correctly migrate.sh, but it never send the password to the other host.
I am working on this since days, I can't figure it out.
Can anyone help me?
Thank you very much.
|