# HG changeset patch # User Michael Spacefalcon # Date 1402504708 0 # Node ID 134c047c126977c18e726ce7574ed0f81a2cf342 # Parent 8bbdf5221b249b4b1b68e08dd8dd1d4ca26a63a7 loadtools: Iota poweroff on Compal targets diff -r 8bbdf5221b24 -r 134c047c1269 loadtools/ltexit.c --- a/loadtools/ltexit.c Wed Jun 11 08:32:22 2014 +0000 +++ b/loadtools/ltexit.c Wed Jun 11 16:38:28 2014 +0000 @@ -1,6 +1,6 @@ /* * This module implements the loadtool exit command, along with its - * options for jump-reboot or eventual Iota power-off. + * options for jump-reboot and Iota power-off. */ #include @@ -24,6 +24,16 @@ } static void +exit_iotaoff() +{ + static char *poweroff_argv[2] = {"poweroff", 0}; + + tpinterf_make_cmd(poweroff_argv); + tpinterf_send_cmd(); + exit(0); +} + +static void exit_jump0() { static char *jump0_argv[3] = {"jump", "0", 0}; @@ -41,6 +51,7 @@ } exit_modes[] = { {"bare", exit_bare}, {"gta02-cutpwr", exit_gta02_cutpwr}, + {"iota-off", exit_iotaoff}, {"jump0", exit_jump0}, {0, 0} }; diff -r 8bbdf5221b24 -r 134c047c1269 loadtools/scripts/compal.config --- a/loadtools/scripts/compal.config Wed Jun 11 08:32:22 2014 +0000 +++ b/loadtools/scripts/compal.config Wed Jun 11 16:38:28 2014 +0000 @@ -25,3 +25,6 @@ # The remaining settings are carried out via loadagent commands init-script compal.init + +# Perform a Iota poweroff when we are done +exit-mode iota-off