Devices for BSD 4.3 system managers
The following discusses devices for BSD 4.3 system managers.
A device on a 4.3 BSD system is accessible to an application only when:
- The device is physically installed and functioning.
- The driver for the device is in the kernel.
- The device special files for the device exist in the /dev directory.
A device on AIX is accessible to an application only when:
- The device is physically installed and functioning.
- The driver for the device is in the kernel or in a loaded kernel extension.
- The device special files for the device exist in the /dev directory.
- The object database in the /etc/objrepos directory contains entries for the device that match the physical configuration.
The device specific programs called methods, found in the /etc/methods directory, maintain the object database. The methods are invoked by the Configuration Manager (accessed through the cfgmgr command) and other commands.
If a device can no longer be accessed by an application program, it can mean that the hardware is faulty or it can mean that the configuration database in the /etc/objrepos directory is damaged.
The cfgmgr command processes the configuration database in the /etc/objrepos directory and is processed at startup time by the cfgmgr command (the Configuration Manager).
The pseudocode below shows the Configuration Manager logic:
/* Main */
While there are rules in the Config_Rules database
{
Get the next rule and execute it
Capture stdout from the last execution
Parse_Output(stdout)
}
/* Parse Output Routine */
/* stdout will contain a list of devices found */
Parse_OutPut(stdout)
{
While there are devices left in the list
{
Lookup the device in the database
if (!defined)
Get define method from database and execute
if (! configured)
{
Get config method from database and execute
Parse_Output(stdout)
}
}
}