Archlinux systemd 开机执行rc.local
来源:互联网 发布:淘宝退款淘金币退吗 编辑:程序博客网 时间:2024/05/30 23:02
Archlinux 替换initscript 为systemd方式后,许多服务启动方式已经发生变化。原来的/etc/rc.local已经消失,并被建议使用tmpfiles.d方式替换。但是有些操作tmpfiles.d无法替代。
需要手动写一个rc-local.service 文件。
nano /usr/lib/systemd/system/rc-local.service
#内容如下:[Unit]Description="/etc/rc.local Compatibility" [Service]Type=forkingExecStart=/etc/rc.local startTimeoutSec=0StandardInput=ttyRemainAfterExit=yesSysVStartPriority=99[Install]WantedBy=multi-user.target
启用脚本 :
systemctl enable rc-local.service
创建启动文件rc.local:
vim /etc/rc.local chmod +x /etc/rc.local
输入你的开机执行的操作,例如 :
#!/bin/shecho 123 > /123.txtexit 0
注意必须要有sh脚本的头声明:”#!/bin/sh”
0 0
- Archlinux systemd 开机执行rc.local
- Arch下systemd无法开机执行rc.local之解决方法
- CentOS 6.5 rc.local 开机不执行的原因之一
- 解决Linux开机启动文件rc.local不能自动执行
- Centos7下rc.local文件开机不执行…
- centos7 的/etc/rc.local不会开机执行
- rc.local中添加开机启动项后不执行原因总结
- centos7 开机/etc/rc.local 不执行的问题
- centos7 开机/etc/rc.local 不执行的问题
- centos7 开机/etc/rc.local 不执行的问题
- Centos7下rc.local文件开机不执行
- centos7 开机/etc/rc.local 不执行的问题
- 解决centos7 开机/etc/rc.local 不执行的问题
- CentOS7 的/etc/rc.local不会开机执行解决方案
- Linux开机启动/etc/rc.d/rc.local 中部分命令执行失败
- centos7 开机/etc/rc.local 不执行的问题及部分命令执行不成功
- Why and How to Enable rc.local Support with Systemd
- profile,rc.local执行顺序
- Delphi中使用TThread类实现多线程
- 非模态对话框的销毁
- cocos2dx 关于拖影(类似dnf传承武器的拖尾效果)的快速实现
- 黑马程序员之 ---- 基础语法下(方法、数组)
- nginx errors
- Archlinux systemd 开机执行rc.local
- 三层——c#版
- 【IOS APP】i聊QQ版
- iOS开发系列之二--音频播放、录音、视频播放、拍照、视频录制
- C++实现Singleton模式
- PHP设计模式——装饰器模式
- 黑马程序员之 --- 面向对象上
- iOS开发系列之三--地图与定位
- 黑马程序员之 --- 面向对象下