LinuxCommandLibrary

init-checkconf

Validate init configuration files

SYNOPSIS

init-checkconf [FILE]

PARAMETERS

FILE
    Path to inittab-style file to check (default: /etc/inittab)

DESCRIPTION

init-checkconf is a lightweight utility from the sysvinit package designed to validate the syntax of the /etc/inittab file used by traditional SysV init systems on Linux. The inittab file defines init's behavior, including runlevels, process respawning, and system states via colon-separated fields: ID, runlevels, action, and process.

It parses the file line-by-line, detecting common errors like:
• Missing or extraneous colons between fields.
• Invalid or duplicate entry IDs (first field, 1-4 characters).
• Malformed runlevel specifications (second field).
• Unrecognized actions (third field, e.g., respawn, wait).
• Empty or invalid process commands (fourth field).

Errors are printed to stderr with line numbers and descriptions. No errors result in silent exit (status 0). It performs only syntactic validation, not semantic checks like process executability or logical consistency.

Primarily used before rebooting after inittab edits to avoid boot failures. On systemd-dominated distros, sysvinit provides backward compatibility, but inittab is often unused or emulated.

CAVEATS

SysV init only; ineffective on pure systemd systems where inittab is ignored.
Limited to syntax; ignores file permissions or process validity.
May report false positives on non-standard entries.

EXIT STATUS

0: syntax OK.
1: syntax errors found.

EXAMPLE OUTPUT

init-checkconf
/etc/inittab:5: bad id 'abcde' (too long)
/etc/inittab:10: missing process field

HISTORY

Developed as part of AT&T System V Unix init tools in the 1980s. Ported to Linux sysvinit by Miquel van Smoorenburg (1991). Widely used until systemd adoption (~2010s); now legacy in most distros.

SEE ALSO

init(8), telinit(8), inittab(5)

Copied to clipboard