#915 Set boot mode to ogLive on client creation

Otherwise, users have to use POST /modes to make clients bootable.
master
Javier Sánchez Parra 2022-03-28 10:43:58 +02:00
parent 0e47f675e0
commit f2d83cef7d
1 changed files with 8 additions and 0 deletions

View File

@ -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;
}