This section explains how to use .ncf batch files to load modules, execute System Console commands, and configure subsystems. For procedures, see the following:
A server batch file is an executable file containing server console commands. You execute the file by entering its name at the System Console prompt. NetWare then executes all the commands in the file in order.
By default the NetWare installation process creates two batch files that are always executed whenever the server is booted:
Startup.ncf: This file is executed first. It loads the server’s disk drivers and name spaces, and can execute certain server parameters that cannot be executed anywhere else. This file resides in the server’s startup directory, c:\nwserver.
Autoexec.ncf: This file is executed after startup.ncf and after volume sys: is mounted. It sets time synchronization parameters and the bindery context, stores the server name, loads the communication protocol, loads the LAN drivers and settings for the network boards, binds the protocol to the installed drivers, loads other NLM programs, and executes server parameters. This file resides in the sys:system directory.
In addition, you can create a batch file called shutdown.ncf in sys:system to execute commands whenever you shut down the server. The DOWN command executes shutdown.ncf automatically whenever the server is shut down, so you should never include the DOWN command in the shutdown.ncf file.
You can create any other batch files you need. Simply create a text file with a .ncf extension. Place NetWare console commands into the batch file in the order that you want them executed.
NOTE:Each time you save the file, you can increase the file size by up to 4 KB.
At the System Console prompt, enter
[LOAD] EDIT [path]
If you specify a path, include both the directory and filename. The file must be located on a mounted volume or on a local drive of the server.
If you do not specify a path, the system displays a prompt at which you can either enter the filename or display a browse window.
If you enter only the filename, the system assumes a default location of sys:system.
If the file does not exist, EDIT displays a prompt that asks whether the file should be created. Choose Yes to create the new file or No to redisplay the filename prompt. If you choose, EDIT displays a blank screen so you can enter text into the file.
To see the contents of a volume or directory, select the volume or directory name and press Enter. Use the arrow keys to scroll up and down the list of files and directories. To display a file, select the filename and press Enter.
Create or edit the file as needed.
To get a description of the keystrokes to use while using EDIT, press F1.
When finished, press Esc. Selectto save the file or to exit the file without saving changes.
The system redisplays the pathname prompt.
To edit or create another file, enter the file pathname. To redisplay the System Console prompt, press Esc.
The following procedure explains how to use NWCONFIG to create or edit the startup.ncf and autoexec.ncf files.
At the System Console prompt, enter
The system displays a menu containing options to create or edit both the startup.ncf and autoexec.ncf files and to upgrade a NetWare 3.1x autoexec.ncf file.
Select the desired option and press Enter.
If you select the option to upgrade the NetWare 3.1x file, follow the screen prompts. NWCONFIG compares the file with the current NetWare configuration and makes changes to the file as necessary. You can edit the file before saving it.
If you select an option to edit one of the files, the selected file appears in a window.
If you select an option to create one of the files, the system displays the existing file, if there is one, in one window and a new file with default entries in another window, so you can compare the two.
The default entries include only essential contents of the file and reflect the current system setup. For example, the default entries for autoexec.ncf might include time zone information and LOAD and BIND commands for currently installed LAN drivers, but would not include custom configuration settings you have in the original file.
The cursor is active in the new file. Press Tab to toggle between the two files.
Edit the new or existing file as necessary.
Editing and navigation keystrokes are listed at the bottom of the screen. For additional help, press F1.
When finished, save the file by pressing F10 and selectingwhen prompted. To exit without saving, press Alt+F10. Changes to the file take effect after you reboot the server.
IMPORTANT:Each time you edit the autoexec.ncf file or the startup.ncf file, NetWare saves the previous version as autoncf.old or startncf.old.
By default, a .ncf file executes all the commands within it. However, to make a command optional, you can place a question mark (?) in front of it.
The question mark causes the .ncf file to pause at the command and prompt you to execute it. You can respond either Yes or No. You can also specify a default response.
For example, the following line in the autoexec.ncf file causes the file to pause and ask whether to execute the LOAD MONITOR command:
? load monitor
When the autoexec.ncf file is executed, it displays the following prompt:
load monitor? y
The default response is Yes. If you do not respond to the prompt, the default response is executed after 10 seconds.
Both the default response and the time period are configurable.
There are two ways to configure the default response to the command prompt:
?n load monitor
In this example, the default response is N. If the user does not respond to the prompt, Monitor is not loaded.
The parameter setting is overridden by a default specified on the command line.
To configure the time period before the default response is executed, set the Command Line Prompt Time Out (Miscellaneous category) parameter to a time in seconds. The default value is 10 seconds.
If you want to check the functionality of each line in a .ncf file, you can use run the KF8 ON command at the System Console prompt. This lets you lets you pause the execution after each command of a .ncf file.
When you are finished, execute the KF8 OFF command to turn off this functionality.
The server’s name is stored in the autoexec.ncf file. You can change the server name by editing the file. However, changing the server name in the autoexec.ncf file does not affect Novell eDirectory Server objects. You must use ConsoleOne® to rename eDirectory Server objects.
IMPORTANT:Be sure to use ConsoleOne to update any references to the former server name in the eDirectory tree and in the timesync.cfg file.
The server’s internal network number is also stored in the autoexec.ncf file. Even if you use Novell’s Native IP protocol, the internal network number is used as a server ID and will still be stored in the autoexec.ncf file. Do not delete the number.
To change either the server name or the internal network number in the autoexec.ncf file, use NWCONFIG or EDIT at the System Console prompt, then reboot the server.
To use NWCONFIG to change the settings, see Using NWCONFIG to Create and Edit Startup Batch Files. To use EDIT, see Using EDIT to Create and Edit Text and Batch Files.