|
发现centos7 的/etc/rc.local不会开机执行 3 n( T6 x6 j7 w2 O, }
确认了下/etc/rc.local的权限
$ d6 ]! K9 t& B. i# B6 `% C[root@localhost ~]# ll /etc/rc.local3 U. D% y! z) K4 _ @& y; e% v
lrwxrwxrwx. 1 root root 13 8月 12 06:09 /etc/rc.local -> rc.d/rc.local- a3 u" E8 f7 j0 l
[root@localhost ~]# ll /etc/rc.d/rc.local4 j8 a" i9 i" H% |7 m+ T
-rw-r--r--. 1 root root 477 6月 10 13:35 /etc/rc.d/rc.local ' v$ o' d/ Z; Y/ ^) d% f
; V5 k9 i+ Q' _& c, k
3 w8 q4 b0 _* X% G$ j3 f
/etc/rc.d/rc.local没有执行权限,于是按说明的内容执行 登录后复制chmod +x /etc/rc.d/rc.local; h, U% B; E/ I x! w
" F! w* W( {: i9 u, A8 U
9 A* n2 q+ x( p( \: Z" _3 C/ E重启后发现/etc/rc.local能够执行了。 看样子是版本的变迁,/etc/rc.local /etc/rc.d/rc.local正在弃用的路上。 + Z: D- N' s3 {2 h. ^ Y
3 _; ]+ y* M' P) C( X3 w1 U% e |