diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-08-29 13:52:31 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-10-04 16:41:17 +1100 |
commit | e1e2ca689661791ba38bf2572df8a65e36258ac2 (patch) | |
tree | 1dc9b48c120b6488b4d1178fbd375be69c68c9f6 /lib | |
parent | af51ccb8b8664eb9462aa4a6e7e2a9f52430647f (diff) | |
download | talos-petitboot-e1e2ca689661791ba38bf2572df8a65e36258ac2.tar.gz talos-petitboot-e1e2ca689661791ba38bf2572df8a65e36258ac2.zip |
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 <sam@mendozajonas.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/system.c | 1 | ||||
-rw-r--r-- | lib/system/system.h | 1 |
2 files changed, 2 insertions, 0 deletions
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; |