commit - b96221e6b0fba68943e0414aebee615838bf6e58
commit + d718c3b8fb88be531d442d1e9f9f05cb76bbd56b
blob - e63ee18dbaf0b739916640ae036259c98f734058
blob + 5287c97ee9c9f53122b0ca88867d57acadfbe2da
--- 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 + 110dc23caec6958d0d55b5dfc9129ff2477c9467
--- nsh.8
+++ nsh.8
.El
.Pp
.Tg reboot
+.Tg restart
+.Tg reload
.Ic reboot
.Pp
Restart the system.
-Requires
-.Nm
+.Nm
+when 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)/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
+when 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