User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

rc.local_on_modern_systemd [2020/08/10 18:41] (current)
tkbletsc created
Line 1: Line 1:
 +====== /etc/rc.local on modern systemd ======
 +So the systemd crew thinks that rc.local is bad or something and it's not enabled by default. Put it back by making this file:
 +  sudo nano /etc/systemd/system/rc-local.service
 +with content:
 + Description=/etc/rc.local Compatibility
 + ConditionPathExists=/etc/rc.local
 + Type=forking
 + ExecStart=/etc/rc.local start
 + TimeoutSec=0
 + StandardOutput=tty
 + RemainAfterExit=yes
 + SysVStartPriority=99
 +Note: the "" is something I added so it would wait for NFS. If you don't need NFS to be up, you can remove that line.
 +Enable this new service:
 +  sudo systemctl enable rc-local
 +Make a new fresh rc.local:
 +  printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee /etc/rc.local
 +  sudo chmod +x /etc/rc.local
 +If that doesn't work, the coward's way out is to use the @reboot cron specifier. 
 +Source for the above: [[|this]] plus [[|this for NFS support]].
rc.local_on_modern_systemd.txt ยท Last modified: 2020/08/10 18:41 by tkbletsc