From dc4e9154565a6fda291d344190bc38c12606aa63 Mon Sep 17 00:00:00 2001 From: age Date: Tue, 5 Jul 2005 12:52:37 +0000 Subject: [PATCH] neues script, das ein timout fuer cryptsetup realisiert --- spielspass/exec_crypt_or_timeout.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 spielspass/exec_crypt_or_timeout.sh diff --git a/spielspass/exec_crypt_or_timeout.sh b/spielspass/exec_crypt_or_timeout.sh new file mode 100755 index 0000000..39840ad --- /dev/null +++ b/spielspass/exec_crypt_or_timeout.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# \ +exec expect -f "$0" ${1+"$@"} +# take commandline value as timeout +#set timeout $argv +set timeout 7 +set prog "/etc/init.d/dmcrypt-wrapper.sh" + +if {[file executable $prog]} { + set progstart "$prog start" +} else { + send "\"$prog\" not found or is not executable\n" + exit +} +send_user "Press return to activate cryptodevices! " +expect -re \n { + system $progstart + exit + } +send "\n\ttimeout after $timeout seconds - not starting \"$prog\"\n" +exit + #send_user $expect_out(buffer);