deepin为什么没有rc.local啊
Tofloor
poster avatar
zst
deepin
2017-05-12 19:38
Author
/etc/rc.local 为什么不存在啊qaq
Reply Favorite View the author
All Replies
avatar
deepinheart
deepin
2017-05-12 19:46
#1
linux启动千差万别,不一定要rc.local,名字不一样也可以,从init开始按照启动脚本顺序执行就行了
Reply View the author
avatar
hfx
deepin
2017-09-22 19:10
#2
Deepin 版本 15.4.1

想让某个程序开机启动,习惯性的去修改 /etc/rc.local 因为以前在 Ubuntu 都是这么干的
可是一看 /etc/ 目录下并没有 rc.local 文件,于是我尝试了一下手工建立 rc.local
  1. sudo vim /etc/rc.local
Copy the Code
在文件里输入如下内容(参照 Ubuntu 的 rc.local)
  1. #!/bin/sh -e

  2. # 在 exit 0 之前添加你的开机启动程序

  3. exit 0
Copy the Code
给文件赋可执行权限
  1. sudo chmod a+x /etc/rc.local
Copy the Code
然后重启电脑,发现 rc.local 可以正确执行
Reply View the author
avatar
duanyao
deepin
2017-09-22 19:30
#3
因为 deepin 用 systemd 了,标准的做法是把你的任务写成 systemd 服务。
Reply View the author