弹性云服务器 ECS-CentOS 7中/etc/rc.local开机启动脚本不生效怎么办?:根因分析

时间:2024-05-21 10:26:57

根因分析

出现该问题的可能原因如下:

  • CentOS 7中/etc/rc.d/rc.local文件没有执行权限。解决方案请参考处理方法1

    /etc/rc.local为/etc/rc.d/rc.local的软链接

  • /etc/rc.local配置路由重启不生效的场景,是由于添加路由依赖网络服务,而在CentOS 7系统启动过程中内核读取rc.local时网络服务尚未启动,导致添加路由失败。解决方案请参考处理方法2
support.huaweicloud.com/trouble-ecs/ecs_trouble_0349.html