init システムの比較
From Gentoo Wiki
この記事は init システムを対比させ比較します。以下で比較される init システムには、Gentoo で利用可能なものもあれば、そうでないもの (例えば launchd や SMF) もあります。
利用可能なソフトウェア
Feature | Init system | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
sysvinit | OpenRC | upstart | systemd | SMF | launchd | Epoch | finit | runit | s6 + s6-rc | BSD rc.d | |
Supported in Gentoo | partially (used by OpenRC) | Yes (default init) | No | Yes | No | No | Yes | No | Yes | No | No |
Package / Bug# | sys-apps/sysvinit | sys-apps/openrc | bug #498376 sys-apps/upstart in unity-gentoo overlay. |
sys-apps/systemd | - | - | sys-apps/epoch | - | sys-process/runit | sys-apps/s6 + sys-apps/s6-rc | - |
Supported platforms | Linux / BSD | Linux + BSD | Linux | Linux | Solaris | MacOSX | Linux | Linux | Linux / BSD / MacOSX | Linux / BSD / MacOSX | BSD |
Main coding language | C | POSIX shell (+ C) | C | C | C | C | C | C | C | C | POSIX shell (+ C) |
Main dependencies | - | init (sysv or BSD) | D-Bus | D-Bus | init(sysv?) | - | libc, /bin/sh | ? | - | skalibs, execline | rcorder |
Init script/service format | single config file | shell scripts | config files + shell fragments | config files (ini) | XML (+ shell scripts) | plist | multiple or single .conf | multiple or single .conf | shell scripts | execline or shell scripts | shell scripts |
Per-service configuration | No | Yes (conf.d) | With in-job mechanisms (normal exit, respawn) | Yes | Yes (service instances) | ? | Yes (v1.1+) | ? | No | No | No |
Running as a daemon | Yes (PID 1) | Yes (PID 1) | Yes (PID 1) | Yes (PID 1) | Yes (invoked) | Yes (PID 1) | Yes (PID 1) | Yes (PID 1) | Yes (PID 1) | Yes (sys-apps/s6-linux-init) | Yes (PID 1) |
Cross-service dependencies/events | No | Yes | Yes | Yes | Yes | No | Yes (basic support, v1.3+) | ? | Yes | Yes | Yes |
Parallel service startup | Yes | Yes (optional) | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes |
Keeping daemons alive | Yes | Yes (optional v0.21+ via supervise-daemon) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Preferred service file supplier | n/a | Gentoo | Ubuntu | upstream | Solaris | MacOSX | n/a | n/a | Void Linux | n/a | NetBSD, FreeBSD, OpenBSD |
License | GPL v2+ | 2-cl. BSD | GPL v2 | LGPL v2.1+ | ? | Apache License 2.0 | Unlicense | MIT | BSD | ISC | BSD |
(Gentoo で) 対応されているサービス
機能 | OpenRC | systemd |
---|---|---|
ファイルシステムのマウント | グループ (root, local, network, swap...) 毎に 1 つのスクリプト。 | 依存関係とともに実行時に生成される、マウントポイント毎に 2 つのユニット (fsck + mount)。 |
getty (ターミナルプロンプト) | /etc/inittab または agetty スクリプトによって開始されます。 | テンプレートから必要に応じてインスタンス化される、コンソール毎に 1 つのユニット。 |
ネットワークの構成 | 複数の選択肢[1]。例えば dhcpcd[2][3], netifrc[4], iwd [5], または NetworkManager。[6][7] | 外部 (NetworkManager, networkd, DHCP デーモン)。 |
X11 ディスプレイマネージャの構成 | すべての DM に対する単一のサービス (自動 restart する必要があります)。 | 個別の DM ユニット。 |
関連項目
- Runit — a daemontools-inspired process supervision suite that also provides a program suitable for running as process 1.
- S6 and s6-rc-based init system — an init system built using components from the s6, s6-rc and s6-linux-init packages
- OpenRC — システムが提供する init システムと互換性のある、Unix 系システムのための依存関係ベースの init システム (init の節を確認してください)。
外部資料
- s6 - Forum thread
- Forum thread
- openrc-init
- GNU shepherd - GNU OS のためのサービスマネージャ。