diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-04-22 14:20:49 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-05-06 13:57:30 +1000 |
commit | 81f28af2bd94cc552aef1a7b959e4c6b84457ce7 (patch) | |
tree | 2addc5a78c0f094a2f3080e95fc657ccdfdbc1f0 /discover/event.c | |
parent | e544283809454252c2c2d3148492362ad10643ba (diff) | |
download | talos-petitboot-81f28af2bd94cc552aef1a7b959e4c6b84457ce7.tar.gz talos-petitboot-81f28af2bd94cc552aef1a7b959e4c6b84457ce7.zip |
pb-event: Add 'boot' user event
Add a user event to send a boot command to the discover server.
The format of the boot command is similar to the add command, eg:
pb-event boot@eth0 image="http://host/image" initrd="http://host/initrd"
and also recognises "id", "dtb", and "args" arguments.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/event.c')
-rw-r--r-- | discover/event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discover/event.c b/discover/event.c index 7932378..8b3a1ab 100644 --- a/discover/event.c +++ b/discover/event.c @@ -53,6 +53,8 @@ static int event_parse_ad_header(char *buf, int len, enum event_action *action, *action = EVENT_ACTION_CONF; else if (streq(buf, "dhcp")) *action = EVENT_ACTION_DHCP; + else if (streq(buf, "boot")) + *action = EVENT_ACTION_BOOT; else { pb_log("%s: unknown action: %s\n", __func__, buf); return -1; |