请教各位大神,RHEL6.4 rc.local设置自启动重启之后没有执行,在网上查了很多信息也没有解决,下面是已知问题可能出现的相关信息。
1、系统版本
[root@localhost ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Kernel \r on an \m
2、软链接信息
ls -l /etc/rc{3,5}.d/*local*
lrwxrwxrwx. 1 root root 11 8月 30 20:43 /etc/rc3.d/S99local -> ../rc.local
lrwxrwxrwx. 1 root root 11 8月 30 20:43 /etc/rc5.d/S99local -> ../rc.local
3、执行权限
[root@localhost rc.d]# ll /etc/rc.d/rc.local
-rwxr-xr-x. 1 root root 481 11月 30 16:26 /etc/rc.d/rc.local
4.rc.local内容(隐去部分内容)
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
route add -net 192.168.XX.0 netmask 255.255.255.0 gw 192.168.XX.254
route add -net 192.168.XX.0 netmask 255.255.255.0 gw 192.168.XX.254
mount -t cifs -o user=XXXXX,password=XXXXX //192.168.XX.XX/XXXX_XX /xxx_data
service iptables stop
软连接的不对吧?
/etc/rc3.d/S99local -> ../rc.local 这是指向了/etc/rc.local。
而你显示的是:/etc/rc.d/rc.local
如果中间没有另一个软连接,肯定执行不了。