执行命令的时候,遇到异常,记录下:
# systemctl disable kdump.service
Removed symlink /etc/systemd/system/multi-user.target.wants/kdump.service.
[ 837.657954] systemd[1]: [/usr/lib/systemd/system/mount_ramdisk.service:8] Failed to parse service type, ignoring: Type=forking
上述信息提示解析服务类型失败,忽略:type =forking
怀疑是xxx.service的配置问题,重新改一下:
[Unit]
Description=log traffic
After=local-fs.target
Before=multi-user.target
DefaultDependencies=no
[Service]
Type=Type=forking
ExecStart=/bin/sh /opt/mcu/guard/mount_ramdisk.sh
[Install]
WantedBy=local-fs.target
发现mount_ramdisk.service服务设置有问题
Type=Type=forking
改为
Type=forking
重启服务
# systemctl disable kdump.service
Removed symlink /etc/systemd/system/multi-user.target.wants/kdump.service.
# systemctl enable kdump.service
Created symlink from /etc/systemd/system/multi-user.target.wants/kdump.service to /usr/lib/systemd/system/kdump.service.
ok,没有报错。
分析: