系统重新启动后,basic.target 文件显示不活动,但我很好奇当 basic.target 死机时我的系统是如何启动的
systemctl status basic.target
basic.target - Basic System
Loaded: loaded (/usr/lib/systemd/system/basic.target; static)
Active: inactive (dead) since Thu 2022-06-02 12:59:09 IST; 19min ago
Docs: man:systemd.special(7)
systemd[1]: Reached target Basic System.
systemd[1]: Stopped target Basic System.
当我重新启动 basic.target 服务后,我的单元文件将变得不活动。
[Unit]
Description=My service
Wants=local-fs-pre.target
Before=local-fs.target
After=systemd-remount-fs.service
DefaultDependencies=no
Conflicts=shutdown.target
[Service]
Type=oneshot
ExecStart=-/usr/lib/Myservice/Myservice start
ExecStop=-/usr/lib/Myservice/Myservice start
RemainAfterExit=yes
KillMode=process
TimeoutSec=3600
[Install]
WantedBy=sysinit.target