Ubuntu 16.04.1:一部のプログラムがsystemdシステムとinitVシステムの両方で起動されるのはなぜですか?

Ubuntu 16.04.1:一部のプログラムがsystemdシステムとinitVシステムの両方で起動されるのはなぜですか?

Ubuntu 16.04.1を新しくインストールしましたが、nginxdpkgがnginxをインストールすると、ブートタイム設定が2つの場所に登録されました。

システム位置

起動時にnginxデーモン(または「マルチユーザーターゲット」)の起動を指定するsystemdの設定

% ls -l /etc/systemd/system/multi-user.target.wants/nginx.service                       
/etc/systemd/system/multi-user.target.wants/nginx.service -> /lib/systemd/system/nginx.service

V位置の初期化

起動時にnginxデーモンを起動するように指定するinitV設定(または「ランレベル5」)

% ls -l /etc/rc5.d/S02nginx
lrwxrwxrwx 1 root root 15 Apr  2 23:27 /etc/rc5.d/S02nginx -> ../init.d/nginx

nginx を無効にすると、systemd は、ある種の以前のバージョンとの互換性タスクが発生していることを示すいくつかの出力を提供します。

% sudo systemctl disable  nginx.service  
Synchronizing state of nginx.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable nginx
insserv: warning: current start runlevel(s) (empty) of script `nginx' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `nginx' overrides LSB defaults (0 1 6).

これにより、上記の2つのシンボリックリンクが削除されます。
なぜこれを設定するのですか?新しいsystemd構成または既存のsystemV initのいずれかを使用しないでください。なぜですか?

ベストアンサー1

〜のようにヨルダンこれは Debian から継承され、さまざまな初期化システムをサポートしています。それに加えて、再インストールしなくてもinitシステムを変更することができ、有効または無効になるサービスを含む構成が保存されることを期待できます。これがsysvinitシステムと設定が同期された理由です。 (使用される機能の少なくとも一部はアップストリームsystemdによって提供され、DebianやUbuntuに限定されません。)

おすすめ記事