【发布时间】:2015-09-24 17:14:22
【问题描述】:
我希望 RedHat/CentOS 7 在启动后做一些事情。 我通过编辑该服务调用的脚本来更改 rhel-configure.service:/lib/systemd/rhel-configure (& touch /.unconfigured) 并添加我想要在启动后执行的行。
启动后没有任何反应。在 journalctl 输出中也没有找到任何东西。
我怎样才能调试它或使它工作?
【问题讨论】:
我希望 RedHat/CentOS 7 在启动后做一些事情。 我通过编辑该服务调用的脚本来更改 rhel-configure.service:/lib/systemd/rhel-configure (& touch /.unconfigured) 并添加我想要在启动后执行的行。
启动后没有任何反应。在 journalctl 输出中也没有找到任何东西。
我怎样才能调试它或使它工作?
【问题讨论】:
通常,当您想在启动时执行任务时,您会使用 rc-local 服务。 一切都在这里解释:http://www.certdepot.net/rhel7-configure-rc-local-service/
【讨论】: