3b9cf2
diff -up expect5.45/example/passmass.orig expect5.45/example/passmass
3b9cf2
--- expect5.45/example/passmass.orig	2011-07-27 16:09:31.013843393 +0200
3b9cf2
+++ expect5.45/example/passmass	2011-07-27 16:10:55.667843578 +0200
3b9cf2
@@ -107,6 +107,10 @@ for {set i 0} {$i<$argc} {incr i} {
3b9cf2
 	set login "ssh"
3b9cf2
 	continue
3b9cf2
     } "-telnet" {
3b9cf2
+	if {[file executable /usr/bin/telnet] == 0} {
3b9cf2
+		send_user "It seems that telnet is not installed. Please install telnet in order to use the script with this option.\n"
3b9cf2
+		exit 1
3b9cf2
+	}
3b9cf2
 	set login "telnet"
3b9cf2
 	continue
3b9cf2
     } "-program" {
3b9cf2
diff -up expect5.45/example/weather.orig expect5.45/example/weather
3b9cf2
--- expect5.45/example/weather.orig	2011-07-27 15:49:57.878843862 +0200
3b9cf2
+++ expect5.45/example/weather	2011-07-27 16:08:48.067843491 +0200
3b9cf2
@@ -33,6 +33,11 @@ set timeout 60
3b9cf2
 
3b9cf2
 set env(TERM) vt100	;# actual value doesn't matter, just has to be set
3b9cf2
 
3b9cf2
+if {[file executable /usr/bin/telnet] == 0} {
3b9cf2
+	send_user "It seems that telnet is not installed. Please install telnet in order to use this script.\n"
3b9cf2
+	exit 1
3b9cf2
+}
3b9cf2
+
3b9cf2
 spawn telnet rainmaker.wunderground.com 3000
3b9cf2
 while {1} {
3b9cf2
 	expect timeout {