the automatic service restart should not happen during sysupgrade
[project/procd.git] / system.c
index 0b3c466..54a84b4 100644 (file)
--- a/system.c
+++ b/system.c
@@ -29,6 +29,8 @@
 
 static struct blob_buf b;
 
+int upgrade_running = 0;
+
 static int system_board(struct ubus_context *ctx, struct ubus_object *obj,
                  struct ubus_request_data *req, const char *method,
                  struct blob_attr *msg)
@@ -191,6 +193,8 @@ static int system_upgrade(struct ubus_context *ctx, struct ubus_object *obj,
        log_shutdown();
        hotplug_shutdown();
 
+       upgrade_running = 1;
+
        return 0;
 }