Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.94 KB

File metadata and controls

33 lines (24 loc) · 1.94 KB

systemd-sysv-generator

systemd是如何使用sysv的启动文件

systemd已经没有了启动等级的问题,采用target的方式,那么传统的init.d里面的脚本怎么使用就成了问题,所以有了systemd-sysv-generator,会进行转换,那些脚本需要添加相应的描述头便于信息提取转换。

参考文档

程序

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