Ubuntu 从 init 脚本转换到 Upstart 的当前状态如何?

Ubuntu 从 init 脚本转换到 Upstart 的当前状态如何?

Ubuntu 从init.d脚本upstart/etc/init.d/? 我很好奇,因此我将 的内容与/etc/init/我们其中一台运行 Ubuntu 12.04 LTS Server 的开发机器上的内容进行了比较。

# /etc/init.d/               # /etc/init/
acpid                        acpid.conf
apache2                      ---------------------------
apparmor                     ---------------------------
apport                       apport.conf
atd                          atd.conf
bind9                        ---------------------------
bootlogd                     ---------------------------
cgroup-lite                  cgroup-lite.conf
---------------------------  console.conf
console-setup                console-setup.conf
---------------------------  container-detect.conf
---------------------------  control-alt-delete.conf
cron                         cron.conf
dbus                         dbus.conf
dmesg                        dmesg.conf
dns-clean                    ---------------------------
friendly-recovery            ---------------------------
---------------------------  failsafe.conf
---------------------------  flush-early-job-log.conf
---------------------------  friendly-recovery.conf
grub-common                  ---------------------------
halt                         ---------------------------
hostname                     hostname.conf
hwclock                      hwclock.conf
hwclock-save                 hwclock-save.conf
irqbalance                   irqbalance.conf
killprocs                    ---------------------------
lxc                          lxc.conf
lxc-net                      lxc-net.conf
module-init-tools            module-init-tools.conf
---------------------------  mountall.conf
---------------------------  mountall-net.conf
---------------------------  mountall-reboot.conf
---------------------------  mountall-shell.conf
---------------------------  mounted-debugfs.conf
---------------------------  mounted-dev.conf
---------------------------  mounted-proc.conf
---------------------------  mounted-run.conf
---------------------------  mounted-tmp.conf
---------------------------  mounted-var.conf
networking                   networking.conf
network-interface            network-interface.conf
network-interface-container  network-interface-container.conf
network-interface-security   network-interface-security.conf
newrelic-sysmond             ---------------------------
ondemand                     ---------------------------
plymouth                     plymouth.conf
plymouth-log                 plymouth-log.conf
plymouth-splash              plymouth-splash.conf
plymouth-stop                plymouth-stop.conf
plymouth-upstart-bridge      plymouth-upstart-bridge.conf
postgresql                   ---------------------------
pppd-dns                     ---------------------------
procps                       procps.conf
rc                           rc.conf
rc.local                     ---------------------------
rcS                          rcS.conf
---------------------------  rc-sysinit.conf
reboot                       ---------------------------
resolvconf                   resolvconf.conf
rsync                        ---------------------------
rsyslog                      rsyslog.conf
screen-cleanup               screen-cleanup.conf
sendsigs                     ---------------------------
setvtrgb                     setvtrgb.conf
---------------------------  shutdown.conf
single                       ---------------------------
skeleton                     ---------------------------
ssh                          ssh.conf
stop-bootlogd                ---------------------------
stop-bootlogd-single         ---------------------------
sudo                         ---------------------------
---------------------------  tty1.conf
---------------------------  tty2.conf
---------------------------  tty3.conf
---------------------------  tty4.conf
---------------------------  tty5.conf
---------------------------  tty6.conf
udev                         udev.conf
udev-fallback-graphics       udev-fallback-graphics.conf
udev-finish                  udev-finish.conf
udevmonitor                  udevmonitor.conf
udevtrigger                  udevtrigger.conf
ufw                          ufw.conf
umountfs                     ---------------------------
umountnfs.sh                 ---------------------------
umountroot                   ---------------------------
---------------------------  upstart-socket-bridge.conf
---------------------------  upstart-udev-bridge.conf
urandom                      ---------------------------
---------------------------  ureadahead.conf
---------------------------  ureadahead-other.conf
---------------------------  wait-for-state.conf
whoopsie                     whoopsie.conf

说实话,我不太确定我是否正确理解了职责划分,因为我没想到会出现任何重叠(哪个框架处理哪些服务)。因此,当我得知服务引用中存在大量重叠时,我感到非常惊讶,此外,我无法辨别这两个框架中的哪一个是主要服务框架。

  • init.d为什么在和之间单个服务处理似乎存在大量冗余upstart?这里是否还有其他我遗漏的地方?

  • 是什么阻碍了upstart的完全接管init.d?某些守护进程需要某些功能,但upstart目前还没有这些功能,从而阻碍了某些服务转换?还是完全是其他原因?

答案1

许多软件包的服务在移植到 Upstart 之前都是使用 initscripts 进行控制的,但它们仍然在 /etc/init.d/ 中附带一个“initscript”,它实际上是指向 /lib/init/upstart-job 的符号链接,它将 initscript 语法转换为大致相同的 upstart 语法。例如,在我的系统上,90 个“initscripts”中的 51 个实际上是指向 /lib/init/upstart-job 的符号链接。

相关内容