Blame tests/p_coreutils/sleeptimeout.sh
|
Alice Kaerast |
a5b9f7 |
#!/bin/bash
|
|
Alice Kaerast |
a5b9f7 |
# Author Alice Kaerast <alice@kaerast.info>
|
|
Alice Kaerast |
a5b9f7 |
|
|
Alice Kaerast |
a5b9f7 |
t_Log "$0 checking timeout and sleep"
|
|
Alice Kaerast |
a5b9f7 |
|
|
Christoph Galuschka |
bbf78c |
if [ $centos_ver = 5 ]
|
|
Christoph Galuschka |
bbf78c |
then
|
|
Christoph Galuschka |
bbf78c |
t_Log "This is a C5 system. no 'timeout' available. Skipping."
|
|
Christoph Galuschka |
bbf78c |
ret_val=0
|
|
Christoph Galuschka |
bbf78c |
else
|
|
Christoph Galuschka |
bbf78c |
timeout 1 sleep 2
|
|
Christoph Galuschka |
bbf78c |
test $? -eq 124 && timeout 2 sleep 1
|
|
Christoph Galuschka |
bbf78c |
ret_val=$?
|
|
Christoph Galuschka |
bbf78c |
fi
|
|
Christoph Galuschka |
bbf78c |
|
|
Christoph Galuschka |
bbf78c |
t_CheckExitStatus $ret_val
|