Instead of calling sh twice to echo the 'exiting' message just call sh
by itself and leave any welcome message to the shell's interactive
config.
Also drop the explicit nc_scr_unpost() in cui_run_cmd() since clear()
will blank out the screen anyway.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
void cui_on_exit(struct pmenu *menu)
{
struct cui *cui = cui_from_pmenu(menu);
void cui_on_exit(struct pmenu *menu)
{
struct cui *cui = cui_from_pmenu(menu);
cui_cancel_autoboot_on_exit(cui);
cui_cancel_autoboot_on_exit(cui);
- sh_cmd = talloc_asprintf(cui,
- "echo \"Exiting petitboot. Type 'exit' to return.\";\
- echo \"You may run 'pb-sos' to gather diagnostic data\";\
- %s", pb_system_apps.sh);
-
- if (!sh_cmd) {
- pb_log("Failed to allocate shell arguments\n");
- return;
- }
-
const char *argv[] = {
pb_system_apps.sh,
const char *argv[] = {
pb_system_apps.sh,
NULL
};
cui_run_cmd(cui, argv);
nc_scr_status_printf(cui->current, _("Returned from shell"));
NULL
};
cui_run_cmd(cui, argv);
nc_scr_status_printf(cui->current, _("Returned from shell"));
nc_scr_status_printf(cui->current, _("Running %s..."), cmd_argv[0]);
nc_scr_status_printf(cui->current, _("Running %s..."), cmd_argv[0]);
- nc_scr_unpost(cui->current);
endwin();
result = process_run_sync(process);
endwin();
result = process_run_sync(process);