laughk / archlinux-note

普段使っている ArchLinux に関するメモ置き場です
5 stars 0 forks source link

systemd 環境でも /etc/rc.local が使いたい #12

Closed laughk closed 8 years ago

laughk commented 8 years ago

laughk/dell-xps15-9550/issues/11 の件でたまたま以下のWikiを発見した

https://wiki.archlinux.org/index.php/User:Herodotus/Rc-Local-Systemd

laughk commented 8 years ago

何も考えずにWikiの通り追加

$ cat /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local compatibility

[Service]
Type=oneshot
ExecStart=/etc/rc.local
# disable timeout logic
TimeoutSec=0
#StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

enable しておく

$ sudo systemctl enable rc-local                               
Created symlink from /etc/systemd/system/multi-user.target.wants/rc-local.service to /etc/systemd/system/rc-local.service.
laughk commented 8 years ago

これはこれで効いてるっぽいのでクローズ。