centos7 开机/etc/rc.local 不执行的问题
最近发现centos7 的/etc/rc.local不会开机执行,于是认真看了下/etc/rc.local文件内容的就发现了问题的原因了
#!/bin/bash# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES## It is highly advisable to create own systemd services or udev rules# to run scripts during boot instead of using this file.## In constrast to previous versions due to parallel execution during boot# this script will NOT be run after all other services.## Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure# that this script will be executed during boot. |
翻译:
#这个文件是为了兼容性的问题而添加的。##强烈建议创建自己的systemd服务或udev规则来在开机时运行脚本而不是使用这个文件。##与以前的版本引导时的并行执行相比较,这个脚本将不会在其他所有的服务后执行。##请记住,你必须执行“chmod +x /etc/rc.d/rc.local”来确保确保这个脚本在引导时执行。 |
于是我有确认了下/etc/rc.local的权限
[root@localhost ~]# ll /etc/rc.locallrwxrwxrwx. 1 root root 13 8月 12 06:09 /etc/rc.local -> rc.d/rc.local[root@localhost ~]# ll /etc/rc.d/rc.local-rw-r--r--. 1 root root 477 6月 10 13:35 /etc/rc.d/rc.local |
/etc/rc.d/rc.local没有执行权限,于是按说明的内容执行
chmod +x /etc/rc.d/rc.local |
重启后发现/etc/rc.local能够执行了。
看样子是版本的变迁,/etc/rc.local /etc/rc.d/rc.local正在弃用的路上。
centos7 开机/etc/rc.local 不执行的问题的更多相关文章
- 解决centos7 开机/etc/rc.local 不执行的问题
最近发现centos7 的/etc/rc.local不会开机执行,于是认真看了下/etc/rc.local文件内容的就发现了问题的原因了 ? 1 2 3 4 5 6 7 8 9 10 11 #!/bi ...
- centos7开机/etc/rc.local不执行的问题
最近发现centos7 的/etc/rc.local不会开机执行,于是认真看了下/etc/rc.local文件内容的就发现了问题的原因了 #!/bin/bash# THIS FILE IS ADDED ...
- centos7 开机/etc/rc.local 不执行的问题(转载)
最近发现centos7 的/etc/rc.local不会开机执行,于是认真看了下/etc/rc.local文件内容的就发现了问题的原因了 #!/bin/bash # THIS FILE IS ADDE ...
- CentOS rc.local 不执行的问题
centos7 开机/etc/rc.local 不执行的问题 时间:2015-02-09 00:54来源:blog.51cto.com 作者:“闲潭小筑” 博客, 举报 点击:次 最近发现centos ...
- centos7下/etc/rc.local文件里配置的开机启动项不执行的解决办法
习惯于在/etc/rc.local文件里配置我们需要开机启动的服务,这个在centos6系统下是正常生效的.但是到了centos7系统下,发现/etc/rc.local文件里的开机启动项不执行了!仔细 ...
- Linux开机启动文件rc.local无法执行怎么办?
rc.local是Linux系统中的一个重要的开机启动文件,每次开机都要执行这个文件.但是有一些用户的Linux系统无法执行这个文件,并导致了一系列的问题.遇到这个问题我们应该怎么办呢? 在Linux ...
- Linux树莓派中/etc/rc.local不执行的问题
最近研究在树莓派中嵌入式开发java程序,并打算和Salesforce进行通信.需要开发一个java的web server,不想弄那么复杂,于是打算在linux系统中/etc/rc.local写想要执 ...
- CentOS开机自启动/etc/rc.local不执行的解决办法
放置在开机自启动里面没有自动启动 查看文件/etc/rc.local发现是一个软连接 修改源文件的执行权限即可 chmod 755 /etc/rc.d/rc.local 查看日志可以看到开机自启动过程 ...
- centos 7.1开机/etc/rc.local脚本不执行的问题
Centos 7.1中,/etc/rc.local是一个软链接文件.指向的是/etc/rc.d/rc.local 在Centos之前的版本我们都会将一些开机需要执行的命令加入到/etc/rc.loca ...
随机推荐
- 最好的vim教程莫过于vimtutor
最好的vim教程莫过于vimtutor 直接运行vimtutor即可
- NLTK中文语料库sinica_treebank
http://www.hankcs.com/program/python/nltk-chinese-corpus-sinica_treebank.html NLTK包含Sinica (中央研究院)提供 ...
- ecshop JSON,ajax.call 异步传输
1.res = Ajax.call('user.php?act=depot_id', 'id='+v,null,"GET", "JSON",false); 2. ...
- PostSharp AOP
使用PostSharp 在.NET 平台上实现 AOP 摘要 本文首先介绍AOP(面向方面编程)的相关概念及理论,然后介绍如何使用PostSharp框架在.NET平台上实现AOP,最后对PostS ...
- AspNetUsers
public class CanDooDbContext : DbContextBase<CanDooDbContext> { protected override void OnMode ...
- autofac + owin + webform + mvc + webapi集成demo
http://git.oschina.net/shiningrise/AutofacOwinDemo using Microsoft.Owin; using Owin; using System.We ...
- valuestack,stackContext,ActionContext.之间的关系以及如何存取数值的
2013-03-15 10:54 1722人阅读 评论(1) 收藏 举报 分类: J2EE 版权声明:本文为博主原创文章,未经博主允许不得转载. 三者之间的关系如下图所示: ActionCont ...
- Css常用收集
/*-------------------------------------- 圆角*/ -webkit-border-radius: 4px; -moz-border-radius: 4px; ...
- [转]Sql按年份.月份.每天统计数量
1.每年 select year(ordertime) 年, sum(Total) 合计 from 表 group by year(ordertime) 2.每月 select year(ordert ...
- php的exit和die
首先, 两者是相等的: exit is equivalent to die; 其次, 都是语言构造器, language construct. 不是函数! 后面的内容用括号括起来只是为了方便... 用 ...