exit [return_code]

Causes the JNOS program to terminate gracefully plus provide the operating system a return code that may be used for scripting further action after termination. The command responds with: "Are you sure?" query to allow the sysop to recind the command. Enter "y(es) <cr>" to end jnos processing. Any other response returns to JNOS. While terminating, jnos will execute the OnexitNosFile script if it exists.

<return_code> is a numeric value returned to the operating system platform after termination is complete. Default: 0

When shelled out to the platform thur the jnos shell command, the operating system command exit causes a return to the JNOS> prompt.

In the DOS platform, the administrator may include a batch file, which may then take action depending on the return code. For example:

:rerun
jnos110i  -u1 -g2
if errorlevel 100   goto remote_exit
if errorlevel 99    reboot
if errorlevel 1     goto rerun
goto exit
:remote_exit
:exit

In this example, issuing "exit 99" would run the reboot command, "exit 1" would restart JNOS, and "exit" or "exit 0" would exit the batch file that invoked JNOS. The remote command (c.v.) when given the exit parameter, will use a return code of 100.

exit (last edited 2007-03-16 12:41:12 by GeorgeVerDuin)