3

At the top of files in /etc/init.d are comments like the following.

### BEGIN INIT INFO
# Provides:        ntp
# Required-Start:  $network $remote_fs $syslog
# Required-Stop:   $network $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:    1
# Short-Description: Start NTP daemon
### END INIT INFO

What is the program that parses those comments? I'm interested in seeing how it does it. Is it a script?

1 Answer 1

5

The LSB info is parsed by insserv on older Ubuntu and Debian systems, and by chkconfig on older Redhat and Fedora systems, and is now parsed by /usr/lib/systemd/system-generators/systemd-sysv-generator on systems using systemd.

All of these are coded in C. The pre-systemd chkconfig sources in the above link are probably a good starting point.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .