I have Linux Mint 17.3. I use upstart and init (sysvinit).

As I understand it, configuration files for upstart are stored in the / etc / init / directory, which have similar lines:

start on ((filesystem and runlevel [! 06] and started dbus and plymouth-ready) or runlevel PREVLEVEL = S)

These configs creates upstart? How does he know what to run after? or were these configs created by the developers of a particular daemon?

    1 answer 1

    Do these configs create an upstart or were these configs created by developers of a particular daemon?

    If you look at the ownership of packages from this directory:

    $ dpkg -S /etc/init/* ... at: /etc/init/atd.conf ... 

    you will see that they belong to different packages. for example, the /etc/init/atd.conf file belongs to the at package. accordingly, it was created either by the developer or the mainr of the at package.

    How does he know what to run after?

    based on directives inside files. in particular, for example, like this: start on starting другой-сервис — this service will be launched after starting другого-сервиса .

    • ru.stackoverflow.com/questions/518181/... It turns out the demon developer must take into account the init system - Sergey
    • one
      @ Sergey The developer of the package is not required. There are those who prepare packages for inclusion in specific linux distributions. This can be either the developer of the package, or people involved in building the distribution. - Mike
    • one
      @ Sergey, the at package in the ubuntu distribution includes both /etc/init/файл and /etc/init.d/файл . I checked - indeed, when I remove /etc/init/файл upstart /etc/init/файл does not call /etc/init.d/файл . well, it means that it is such a “curve”, this upstart , since it does not support backward compatibility with sysv-style scripts. The same systemd , as far as I know, perfectly supports. and, yes, as Mike rightly pointed out, these are already the problems of the main package, not the developer of the program. - aleksandr barakin
    • one
      @ Sergey, no, not so "curve" upstart . The package includes the /etc/init/rc.conf script, with which the necessary ones are launched during the “transition” (in the case of upstart, it is rather an emulation) from one runlevel to another sysv-style scripts. why atd hasn’t started at me - it is already necessary to understand - aleksandr barakin
    • It did not start because you probably have no atd in /etc/rcN.d. As stated in rc.conf "V-style rc script when changing between runlevels". Also in this rc.conf is the following: /etc/init.d/rc $ RUNLEVEL . And in /etc/init.d/rc there is this: for s in /etc/rc$runlevel.d/K* So, if there is no .conf file for the daemon, then upstart looks at it in / etc / rcN .d directories. If there is no demon there either, it will not start. - Sergey