Commit Diff


commit - 172f4d223a6ded46ac9c24c22b7e6f6f98a96b19
commit + 5aabeb522f621a3b2e1aa2582fa8bc33b11c7bc3
blob - 5ef223c3c7a3b499f4f66d719088edd71904722e
blob + f75041a75842080269269dea31d4cfb72c451c43
--- commands.c
+++ commands.c
@@ -2039,6 +2039,7 @@ size_t cmdtab_nitems = nitems(cmdtab);
  */
 
 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
@@ -1859,10 +1859,15 @@ Sep  8 15:05:37 tobsd tom: interface drops due to unpr
 .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
@@ -1870,7 +1875,34 @@ to be in privileged mode and requires root user privil
 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