neues script, das ein timout fuer cryptsetup realisiert
This commit is contained in:
parent
f33689fdbc
commit
dc4e915456
1 changed files with 22 additions and 0 deletions
22
spielspass/exec_crypt_or_timeout.sh
Executable file
22
spielspass/exec_crypt_or_timeout.sh
Executable file
|
@ -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);
|
Loading…
Reference in a new issue