Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ idmknod(1M) — Interactive 3.2r4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

idinstall(1M)

idmkinit(1M)

mdevice(4)

sdevice(4)

idmknod(1M)  —  

NAME

idmknod − removes nodes and reads specifications of nodes

SYNOPSIS

/etc/conf/bin/idmknod

DESCRIPTION

This command performs the following functions:

Removes the nodes for non-required devices (those that do not have an ‘r’ in field 3 of the the device’s mdevice entry) from /dev.  Ordinary files will not be removed.  If the /dev directory contains subdirectories, those subdirectories will be transversed and nodes found for non-required devices will be removed as well.  If empty subdirectories result due to the removal of nodes, the subdirectories are then removed.  Reads the specifications of nodes given in the files contained in /etc/conf/node.d and installs these nodes in /dev.  If the node specification defines a path containing subdirectories, the subdirectories will be made automatically.  Returns 0 on success and a positive number on error.

The idmknod command is run automatically upon entering init state 2 on the next system reboot after a kernel reconfiguration to establish the correct representation of device nodes in the /dev directory for the running /unix kernel.  idmknod can be called as a user level command to test modification of the /dev directory before a DSP is actually built.  It is also useful in installation scripts that do not reconfigure the kernel, but need to create /dev entries. 

The files in /etc/conf/node.d are copies of the Node modules installed by device Driver Software Packages (DSP).  There is at most one file per DSP.  Each file contains one line for each node that is to be installed.  The format of each line is:

Name of device entry (field 1) in the mdevice file (The mdevice entry will be the line installed by the DSP from its Master module).  This field must be from 1 to 8 characters in length.  The first character must be a letter.  The others may be letters, digits, or underscores.  Name of node to be inserted in /dev.  The first character must be a letter.  The others may be letters, digits, or underscores.  This field can be a path relative to /dev, and idmknod will create subdirectories as needed.  The character b or c.  A b indicates that the node is a ‘block’ type device and c indicates ‘character’ type device.  Minor device number. This value must be between 0 and 255. If this field is a non-numeric, it is assumed to be a request for a streams clone device node, and idmknod will set the minor number to the value of the major number of the device specified. 

Optional: user name/id

group name/id
permissions

Additionally, if multiple entries have the same type, minor device number, user, group, and permissions, they will be created as hard links to each other. 

Some example node file entries are as follows:

asy   tty00   c   1
makes /dev/tty00 for device ‘asy’ using minor device 1.

qt   rmt/c0s0   c   4
makes /dev/rmt/c0s0 for device ‘qt’ using minor device 4.

clone   net/nau/clone  c  nau
makes /dev/net/nau/clone for device ‘clone’. The minor device number is set to the major device number of device ‘nau’.

The command line options are:

−o directory Nodes will be installed in the directory specified rather than /dev. 

−i directory The file mdevice which normally resides in /etc/conf/cf.d, can be found in the directory specified. 

−e directory The Node modules that normally reside in /etc/conf/node.d can be found in the directory specified. 

−s Suppress removing nodes (just add new nodes). 

ERROR MESSAGES

An exit value of zero indicates success.  If an error was encountered due to a syntax or format error in a node entry, an advisory message will be printed to stdout and the command will continue.  If a serious error is encountered (i.e., a required file cannot be found), idmknod will exit with a non-zero value and report an error message.  All error messages are designed to be self-explanatory. 

SEE ALSO

idinstall(1M), idmkinit(1M), mdevice(4), sdevice(4). 

ADDED VALUE

This entry, supplied by SunSoft, Inc., contains enhancements to UNIX System V. 

\*U  —  Version 1.0

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026