]> git.ipfire.org Git - ipfire-3.x.git/blame - expect/patches/expect-5.45-check-telnet.patch
git: Update to 2.23.0
[ipfire-3.x.git] / expect / patches / expect-5.45-check-telnet.patch
CommitLineData
ea015c36
MT
1diff -up expect5.45/example/passmass.orig expect5.45/example/passmass
2--- expect5.45/example/passmass.orig 2011-07-27 16:09:31.013843393 +0200
3+++ expect5.45/example/passmass 2011-07-27 16:10:55.667843578 +0200
4@@ -107,6 +107,10 @@ for {set i 0} {$i<$argc} {incr i} {
5 set login "ssh"
6 continue
7 } "-telnet" {
8+ if {[file executable /usr/bin/telnet] == 0} {
9+ send_user "It seems that telnet is not installed. Please install telnet in order to use the script with this option.\n"
10+ exit 1
11+ }
12 set login "telnet"
13 continue
14 } "-program" {
15diff -up expect5.45/example/weather.orig expect5.45/example/weather
16--- expect5.45/example/weather.orig 2011-07-27 15:49:57.878843862 +0200
17+++ expect5.45/example/weather 2011-07-27 16:08:48.067843491 +0200
18@@ -33,6 +33,11 @@ set timeout 60
19
20 set env(TERM) vt100 ;# actual value doesn't matter, just has to be set
21
22+if {[file executable /usr/bin/telnet] == 0} {
23+ send_user "It seems that telnet is not installed. Please install telnet in order to use this script.\n"
24+ exit 1
25+}
26+
27 spawn telnet rainmaker.wunderground.com 3000
28 while {1} {
29 expect timeout {