From 19534b7ef3e5215c280f8559ffd4c5447caf119d Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Sun, 15 Feb 2015 03:50:28 -0800 Subject: [PATCH] luv-test-manager: Add luv.halt cmdline option for powering off When running automated tests it's super handy to be able to power off the machine once the tests have completed. This signals to any monitoring processes/machines that results are ready to be inspected. If you've got a smart PDU you should be able to query it for the machine's status to know when it's off, but a poor man's solution would be to ping the machine and wait a couple of seconds extra once it disappears from the network. Reviewed-by: Naresh Bhat Tested-by: Naresh Bhat Signed-off-by: Matt Fleming --- .../recipes-core/initscripts/initscripts/luv-test-manager | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager b/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager index e5de98d4e72..983ce4e4b21 100644 --- a/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager +++ b/meta-luv/recipes-core/initscripts/initscripts/luv-test-manager @@ -136,3 +136,8 @@ fi umount -l /mnt/.psplash } + +grep -q luv.halt /proc/cmdline +if [ $? -ne 1 ]; then + halt -p +fi