Commit 9ae2f669 authored by David Johnson's avatar David Johnson
Browse files

Add db updates for RELOAD-PUSH mode.

parent 13e8bb38
......@@ -279,6 +279,8 @@ REPLACE INTO mode_transitions VALUES ('ALWAYSUP','ISUP','RELOAD-MOTE','ISUP','Re
REPLACE INTO mode_transitions VALUES ('RELOAD-MOTE','SHUTDOWN','ALWAYSUP','ISUP','ReloadDone');
REPLACE INTO mode_transitions VALUES ('PCVM','SHUTDOWN','RELOAD-PCVM','SHUTDOWN','ReloadSetup');
REPLACE INTO mode_transitions VALUES ('RELOAD-PCVM','SHUTDOWN','PCVM','SHUTDOWN','ReloadDone');
REPLACE INTO mode_transitions VALUES ('RELOAD-PUSH','SHUTDOWN','MINIMAL','SHUTDOWN','ReloadDone');
REPLACE INTO mode_transitions VALUES ('MINIMAL','SHUTDOWN','RELOAD-PUSH','SHUTDOWN','ReloadStart');
REPLACE INTO mode_transitions VALUES ('SECUREBOOT','TPMSIGNOFF','MINIMAL','SHUTDOWN','');
REPLACE INTO mode_transitions VALUES ('SECUREBOOT','TPMSIGNOFF','NORMAL','SHUTDOWN','');
REPLACE INTO mode_transitions VALUES ('SECUREBOOT','TPMSIGNOFF','NORMALv2','SHUTDOWN','');
......@@ -556,6 +558,12 @@ REPLACE INTO state_transitions VALUES ('RELOAD','TBSETUP','ISUP','FailedBoot');
REPLACE INTO state_transitions VALUES ('RELOAD','TBSETUP','TBFAILED','FailedBoot');
REPLACE INTO state_transitions VALUES ('RELOAD','ISUP','SHUTDOWN','RebootAfterFail');
REPLACE INTO state_transitions VALUES ('RELOAD','TBFAILED','SHUTDOWN','RebootAfterFail');
REPLACE INTO state_transitions VALUES ('RELOAD-PUSH','SHUTDOWN','BOOTING','Booting');
REPLACE INTO state_transitions VALUES ('RELOAD-PUSH','BOOTING','BOOTING','BootRetry');
REPLACE INTO state_transitions VALUES ('RELOAD-PUSH','RELOADSETUP','RELOADING','ReloadStart');
REPLACE INTO state_transitions VALUES ('RELOAD-PUSH','RELOADING','RELOADDONE','ReloadDone');
REPLACE INTO state_transitions VALUES ('RELOAD-PUSH','RELOADDONE','SHUTDOWN','ReloadDone');
REPLACE INTO state_transitions VALUES ('RELOAD-PUSH','SHUTDOWN','RELOADSETUP','ReloadSetup');
REPLACE INTO state_transitions VALUES ('SECUREBOOT','BOOTING','SECVIOLATION','QuoteFailed');
REPLACE INTO state_transitions VALUES ('SECUREBOOT','BOOTING','TPMSIGNOFF','QuoteOK');
REPLACE INTO state_transitions VALUES ('SECUREBOOT','GPXEBOOTING','PXEBOOTING','DHCP');
......@@ -592,6 +600,7 @@ REPLACE INTO state_triggers VALUES ('*','RELOAD','RELOADOLDMFS','RELOADOLDMFS');
REPLACE INTO state_triggers VALUES ('*','RELOAD-PCVM','RELOADDONE','RESET, RELOADDONE');
REPLACE INTO state_triggers VALUES ('*','RELOAD','ISUP','REBOOT');
REPLACE INTO state_triggers VALUES ('*','RELOAD','TBFAILED','REBOOT');
REPLACE INTO state_triggers VALUES ('*','RELOAD-PUSH','RELOADDONE','RELOADDONE');
REPLACE INTO state_triggers VALUES ('*','*','GPXEBOOTING','SECUREBOOT');
REPLACE INTO state_triggers VALUES ('*','*','SECVIOLATION','POWEROFF, EMAILNOTIFY');
REPLACE INTO state_triggers VALUES ('*','SECUREBOOT','BOOTING','');
......
#
# Make stated's MINIMAL mode a little more capable for reloading.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBQueryFatal("REPLACE INTO mode_transitions VALUES " .
"('MINIMAL','SHUTDOWN','RELOAD-PUSH','SHUTDOWN','ReloadStart')");
DBQueryFatal("REPLACE INTO mode_transitions VALUES " .
"('RELOAD-PUSH','SHUTDOWN','MINIMAL','SHUTDOWN','ReloadDone')");
DBQueryFatal("REPLACE INTO state_transitions VALUES " .
"('RELOAD-PUSH','BOOTING','BOOTING','BootRetry')");
DBQueryFatal("REPLACE INTO state_transitions VALUES " .
"('RELOAD-PUSH','RELOADDONE','SHUTDOWN','ReloadDone')");
DBQueryFatal("REPLACE INTO state_transitions VALUES " .
"('RELOAD-PUSH','RELOADING','RELOADDONE','ReloadDone')");
DBQueryFatal("REPLACE INTO state_transitions VALUES " .
"('RELOAD-PUSH','RELOADSETUP','RELOADING','ReloadStart')");
DBQueryFatal("REPLACE INTO state_transitions VALUES " .
"('RELOAD-PUSH','SHUTDOWN','BOOTING','Booting')");
DBQueryFatal("REPLACE INTO state_transitions VALUES " .
"('RELOAD-PUSH','SHUTDOWN','RELOADSETUP','ReloadSetup')");
DBQueryFatal("REPLACE INTO state_triggers VALUES " .
"('*','RELOAD-PUSH','RELOADDONE','RELOADDONE')");
return 0;
}
1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment