【问题标题】:is there a command in centos to dynamically add entries to the inittab file?centos中是否有一个命令可以动态地将条目添加到inittab文件中?
【发布时间】:2011-05-23 15:21:18
【问题描述】:

centos 中是否有动态添加条目到 inittab 文件的命令?我正在编写一个新的守护进程,并希望 init 在它因任何原因死亡时重新启动它。

【问题讨论】:

    标签: centos5


    【解决方案1】:

    你能用 echo 或其他什么添加条目,然后根据需要使用 initctl 吗?

    【讨论】:

    • 但是当软件被卸载时,你如何从文件中删除条目?
    • sed -i -e '/something-that-identifies-the-line/d' /etc/inittab
    猜你喜欢
    • 2010-10-02
    • 1970-01-01
    • 2011-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-24
    相关资源
    最近更新 更多