From e1e2ca689661791ba38bf2572df8a65e36258ac2 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Tue, 29 Aug 2017 13:52:31 +1000 Subject: ui/ncurses: Spawn shell in exit handler In cui_on_exit()_ instead of exiting the program spawn a sh instance. This allows the user to drop to the shell and return without losing any custom boot options, for example. SIGINT still calls cui_abort() to properly exit Petitboot. Signed-off-by: Samuel Mendoza-Jonas --- lib/system/system.c | 1 + lib/system/system.h | 1 + 2 files changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/system/system.c b/lib/system/system.c index 33f79ed..b1121a1 100644 --- a/lib/system/system.c +++ b/lib/system/system.c @@ -32,6 +32,7 @@ const struct pb_system_apps pb_system_apps = { .vgchange = HOST_PROG_VGCHANGE, .pb_plugin = HOST_PROG_PB_PLUGIN, .pb_exec = HOST_PROG_PB_EXEC, + .sh = HOST_PROG_SH, }; #ifndef TFTP_TYPE diff --git a/lib/system/system.h b/lib/system/system.h index e803391..d27c2cd 100644 --- a/lib/system/system.h +++ b/lib/system/system.h @@ -17,6 +17,7 @@ struct pb_system_apps { const char *vgchange; const char *pb_plugin; const char *pb_exec; + const char *sh; }; extern const struct pb_system_apps pb_system_apps; -- cgit v1.2.1