def_prog_mode();
- result = pb_run_cmd(cmd_argv, 1);
+ result = pb_run_cmd(cmd_argv, 1, 0);
reset_prog_mode();
redrawwin(cui->current->main_ncw);
clear();
mvaddstr(1, 0, "system is going down now...");
refresh();
- sleep(60);
+ sleep(cui->dry_run ? 1 : 60);
}
pb_log("%s: failed: %s\n", __func__, cod->kd->image);
struct cui *cui_init(void* platform_info,
int (*on_kexec)(struct cui *, struct cui_opt_data *),
- int (*js_map)(const struct js_event *e), int start_deamon)
+ int (*js_map)(const struct js_event *e), int start_deamon, int dry_run)
{
struct cui *cui;
struct discover_client *client;
cui->platform_info = platform_info;
cui->on_kexec = on_kexec;
cui->timer.handle_timeout = cui_handle_timeout;
+ cui->dry_run = dry_run;
/* Loop here for scripts that just started the server. */