commit - 172f4d223a6ded46ac9c24c22b7e6f6f98a96b19
commit + 5aabeb522f621a3b2e1aa2582fa8bc33b11c7bc3
blob - 5ef223c3c7a3b499f4f66d719088edd71904722e
blob + f75041a75842080269269dea31d4cfb72c451c43
--- commands.c
+++ commands.c
*/
static Command cmdtab2[] = {
+ { "reload", nreboothelp, CMPL0 0, 0, nreboot, 1, 0, 0, 0 },
{ "su", enablehelp, CMPL(ta) (char **)enabletab, sizeof(Menu), enable, 0, 0, 0, 0 },
{ 0, 0, CMPL0 0, 0, 0, 0, 0, 0, 0 }
};
blob - 2686795281c1f2ea0984713a005d6c0e652ec406
blob + c579ddaeafdcd5e41e77eaeb3959b1b28c3cad67
--- nsh.8
+++ nsh.8
.El
.Pp
.Tg reboot
+.Tg restart
+.Tg reload
.Ic reboot
.Pp
Restart the system.
-Requires
+.Nm while processing the command will warn the user if there are
+unsaved changes to the running-config.
+The user will be prompted to confirm the reboot in any case.
+The command requires
.Nm
to be in privileged mode and requires root user privileges.
.Bl -dash
E.g. restart the system
.Bd -literal -offset indent
nsh(config-p)/reboot
-% Reboot initiated
+% WARNING: The running configuration contains unsaved changes!
+% The 'show diff-config' command will display unsaved changes.
+% The 'write-config' command will save changes to /etc/nshrc.
+Proceed with reboot? [yes/no]
+.Ed
+.El
+.Pp
+.Tg reboot
+.Tg restart
+.Tg reload
+.Ic reload
+.Pp
+an alias for the reboot command above.
+.Nm while processing the command will warn the user if there are
+unsaved changes to the running-config.
+The user will be prompted to confirm the reboot in any case.
+The command requires
+.Nm
+to be in privileged mode and requires root user privileges.
+.Bl -dash
+.It
+E.g. restart the system
+.Bd -literal -offset indent
+nsh(config-p)/reload
+% WARNING: The running configuration contains unsaved changes!
+% The 'show diff-config' command will display unsaved changes.
+% The 'write-config' command will save changes to /etc/nshrc.
+Proceed with reboot? [yes/no]
.Ed
.El
.Pp