module update

Signed-off-by: the_big_blue_devil <hanqiaosheng@huawei.com>
This commit is contained in:
the_big_blue_devil 2023-10-28 12:08:30 +08:00
parent 6b464a9400
commit 7dae05d270

View File

@ -595,9 +595,6 @@ int ServiceStart(Service *service, ServiceArgs *pathArgs)
*/
ServiceHookExecute(service->name, NULL, INIT_SERVICE_FORK_BEFORE);
#endif
if (service->attribute & SERVICE_ATTR_MODULE_UPDATE) {
CheckModuleUpdate(pathArgs);
}
int pid = fork();
if (pid == 0) {
// set selinux label by context
@ -605,6 +602,9 @@ int ServiceStart(Service *service, ServiceArgs *pathArgs)
service->lastErrno = INIT_ECONTENT;
}
if (service->attribute & SERVICE_ATTR_MODULE_UPDATE) {
CheckModuleUpdate(pathArgs);
}
#ifdef IS_DEBUG_VERSION
// only the image is debuggable and need debug, then wait for debugger
if (ServiceNeedDebug(service->name) && IsDebuggableVersion()) {