RetroFed Forum
Your home away from modern life.
Restore /etc/rc.local on a systemd tainted Linux distro
Post Reply
AuthorMessage
Jaromil fed.dyne.org jaromil@fed.dyne.org
Joined: 2023-10-10
Quote

cat << EOF > /etc/systemd/system/rc-local.service

[Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=http://multi-user.target
EOF

if ! [ -r /etc/rc.local ]; then
        printf '%s\n' '#!/bin/bash' 'exit 0' | tee -a /etc/rc.local
fi
chmod +x /etc/rc.local
systemctl enable rc-local
1   Original
Post Reply
Back to top