我在 RHEL 6 中有脚本,它使用默认函数,例如 /etc/rc.d/init.d/functions
if [ -f /etc/rc.d/init.d/functions ]; then
# redhat flavor
. /etc/rc.d/init.d/functions
start_cmd="daemon --pidfile $pidfile --user $USER"
else
echo "Unable to find function library" 1>&2
exit 1
fi
我们可以在 RHEL 7 上使用相同的函数来启动守护进程吗?. 还请告诉我,RHEL 6 和 RHEL 7 之间的 /etc/rc.d/ 是否有任何区别?
此文件由initscripts
包提供,默认情况下不包含在 RHEL-7 映像中。然而,它在 RHEL6 映像中。
在 el6 中,它是作为 iproute 和 iputils 的依赖项引入的,而在 el7 中,systemd 满足了这种需求。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句