diff --git a/kernel/sy_old/mars_light.c b/kernel/sy_old/mars_light.c index f23237d7..61e5367d 100644 --- a/kernel/sy_old/mars_light.c +++ b/kernel/sy_old/mars_light.c @@ -1653,11 +1653,21 @@ int _update_file(struct mars_dent *parent, const char *switch_path, const char * make_msg(msg_pair, "disallowing fetch (todo_primary=%d is_primary=%d)", rot->todo_primary, rot->is_primary); do_start = false; } + if (do_start && !global->global_power.button) { + MARS_DBG("disabling fetch due to rmmod\n"); + make_msg(msg_pair, "disabling fetch due to rmmod"); + do_start = false; + } if (do_start && !_check_allow(global, parent, "attach")) { MARS_DBG("disabling fetch due to detach\n"); make_msg(msg_pair, "disabling fetch due to detach"); do_start = false; } + if (do_start && !_check_allow(global, parent, "connect")) { + MARS_DBG("disabling fetch due to disconnect\n"); + make_msg(msg_pair, "disabling fetch due to disconnect"); + do_start = false; + } MARS_DBG("src = '%s' dst = '%s'\n", tmp, file); status = __make_copy(global, NULL, do_start ? switch_path : "", copy_path, NULL, argv, msg_pair, -1, -1, false, false, ©);