lilalo
annotate lm-ssh @ 18:06260270cbe0
Добавлена функция, которая выдаёт результаты
обработки в виде XML.
!!!Недоделан quoting спец.символов XML
обработки в виде XML.
!!!Недоделан quoting спец.символов XML
author | devi |
---|---|
date | Sun Sep 11 22:56:04 2005 +0300 (2005-09-11) |
parents | |
children |
rev | line source |
---|---|
devi@0 | 1 #!/bin/sh |
devi@0 | 2 #\ |
devi@0 | 3 exec expect -- "$0" ${1+"$@"} |
devi@0 | 4 eval spawn ssh $argv |
devi@0 | 5 set timeout 1 |
devi@0 | 6 expect { |
devi@0 | 7 eof { |
devi@0 | 8 } |
devi@0 | 9 "(yes/no)? " { |
devi@0 | 10 send "yes\n" |
devi@0 | 11 exp_continue |
devi@0 | 12 } |
devi@0 | 13 assword: { |
devi@0 | 14 send "rootpass\n" |
devi@0 | 15 } |
devi@0 | 16 timeout { |
devi@0 | 17 interact -nobuffer |
devi@0 | 18 } |
devi@0 | 19 } |
devi@0 | 20 expect { |
devi@0 | 21 eof { |
devi@0 | 22 } |
devi@0 | 23 assword: { |
devi@0 | 24 send "rootpass\n" |
devi@0 | 25 } |
devi@0 | 26 |
devi@0 | 27 timeout { |
devi@0 | 28 interact -nobuffer |
devi@0 | 29 } |
devi@0 | 30 } |
devi@0 | 31 |