diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-03-28 10:43:58 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-03-28 13:46:58 +0200 |
commit | f2d83cef7dd221f129a63aedefcd9a74212cfc99 (patch) | |
tree | 3d359de78dea45385768efc8e3ac401e6ca39e3c /src/rest.c | |
parent | 0e47f675e010ab14f91747eabee99cb8a8a76187 (diff) |
#915 Set boot mode to ogLive on client creation
Otherwise, users have to use POST /modes to make clients bootable.
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1523,6 +1523,14 @@ static int og_cmd_post_client_add(json_t *element, } dbi_result_free(result); + + if (og_set_client_mode(dbi, computer.mac, computer.boot)) { + syslog(LOG_ERR, "failed to set client boot mode (%s:%d)\n", + __func__, __LINE__); + og_dbi_close(dbi); + return -1; + } + og_dbi_close(dbi); return 0; } |