systemd是如何使用sysv的启动文件
systemd已经没有了启动等级的问题,采用target的方式,那么传统的init.d里面的脚本怎么使用就成了问题,所以有了systemd-sysv-generator,会进行转换,那些脚本需要添加相应的描述头便于信息提取转换。
- systemd-sysv-generator — Unit generator for SysV init scripts
- 20.2. Init Script Actions
- How does systemd use /etc/init.d scripts?
- What is the default path that systemd uses to locate locate System V scripts?
- debian services not running
- SysVinit 引导脚本
pi@raspberrypi:/ $ sudo find * -iname systemd-sysv-generator
lib/systemd/system-generators/systemd-sysv-generator
This program is listed in the /lib/systemd/system-generators/ directory and is thus run automatically by systemd early in the bootstrap process at every boot, and again every time that systemd is instructed to re-load its configuration later on.
pi@raspberrypi:/run/systemd $ ls
ask-password fsck.progress generator.late initctl machines notify quotacheck sessions system users
cgroups-agent generator inaccessible journal netif private seats shutdown transient
pi@raspberrypi:/run/systemd/generator.late $ ls
dphys-swapfile.service graphical.target.wants multi-user.target.wants raspi-config.service