On 03/12/2013 07:06 PM, [email protected] wrote:
From: Cheri Van Pelt <[email protected]>
Some older machines are taking longer than 5 seconds to sync before
reboot. To accomodate these machines the sleep time is parameterized.
The default sleep time is 5 seconds, but if additional time is needed,
the sleep_before_reboot variable in global_config.ini can be adjusted
to allow for more time.
Applied, thanks Cheri!
Fixed the sleep command so that it is compatible with python 2.4.
Tested-by: Julius Gawlas <[email protected]>
---
client/job.py | 7 ++++++-
global_config.ini | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/client/job.py b/client/job.py
index 43dabde..0508006 100644
--- a/client/job.py
+++ b/client/job.py
@@ -895,7 +895,12 @@ class base_client_job(base_job.base_job):
# sync first, so that a sync during shutdown doesn't time out
utils.system("sync; sync", ignore_status=True)
- utils.system("(sleep 5; reboot) </dev/null >/dev/null 2>&1 &")
+ sleep_before_reboot = settings.get_value('CLIENT',
'sleep_before_reboot',
+ default="5")
+
+ sleep_cmd = "(sleep %s; reboot) </dev/null >/dev/null 2>&1 &" %
sleep_before_reboot
+ utils.system(sleep_cmd)
+
self.quit()
diff --git a/global_config.ini b/global_config.ini
index 6ab7fcc..a8db422 100644
--- a/global_config.ini
+++ b/global_config.ini
@@ -76,6 +76,8 @@ kernel_mirror: http://www.kernel.org/pub/linux/kernel/
kernel_gitweb:
# gitweb installation(s) for -stable tree (space-separated)
stable_kernel_gitweb:
+# How long to sleep before reboot
+sleep_before_reboot = 5
[SERVER]
# Hostname of the autotest RPC server. You should set a different hostname
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel