use*_*618 5 linux unix rpm init.d deb
我有一个 Debian 和一个需要将启动/停止脚本添加到 /etc/init.d 目录的 RPM 包。最近,一位远程开发人员告诉我,“知情人士”知道“最佳实践”是在 /etc/init.d 目录中实际安装启动程序,而不是使用符号链接,尤其是在可以安装软件包时在不同的分区上。我一直使用符号链接。“ls -la”显示很多包使用符号链接。
是否有 Unix/Linux 大师可以给出关于在 /etc/init.d 目录中启动脚本的最佳实践的明确答案。最佳实践符号链接、硬链接、实际文件还是真的很重要?
如果你能引用一个来源,那就太好了。我在谷歌上搜索了这个话题,但找不到答案。
LSB 标准 ( https://refspecs.linuxbase.org/LSB_2.1.0/LSB-generic/LSB-generic/initsrcinstrm.html ) 规定 /etc/init.d 脚本可以是符号链接:
An init.d file is installed in /etc/init.d (which may be a symlink
to another location) . . .
Run Code Online (Sandbox Code Playgroud)
但老实说,我认为我只见过第 3 方供应商应用程序使用符号链接。
编辑:3.0规范中的相同措辞(https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-generic/LSB-generic/initsrcinstrm.html)
| 归档时间: |
|
| 查看次数: |
8959 次 |
| 最近记录: |