我创建了一个具有必要功能的shell,例如start()stop()restart()
但是我的文件在启动时没有启动。
我在“ ubuntu”中使用过update-rc.d命令将此文件添加到自动启动应用程序列表中。并且它已在启动时成功启动。
但是在“ openwrt”中,我看到了启用功能。任何知道如何使用此启用功能的人,或者“ openwrt”中是否有类似的命令,如update-rc.d
我在这里有一些参考:http : //wiki.openwrt.org/doc/techref/initscripts
/etc/init.d/-目录将自动读取并搜索引导功能或START STOP。在启动时启动。
boot() {
echo boot
# commands to run on boot
}
START-位置然后开始
停止位置然后停止
START=10
STOP=15
start() {
echo start
# commands to launch application
}
stop() {
echo stop
# commands to kill application
}
编辑:
在/etc/rc.common目录中,将编译要在启动时启动的文件。
启用您的功能:/etc/init.d/your_script.sh enable
在这里,您将找到有关启动http://wiki.openwrt.org/doc/techref/process.boot的更多信息。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句