ASL3 Pi Appliance + rc.local + DVSwitch

Part of the ASL3 Pi Appliance expects to manage the file /etc/rc.local which is a legacy way to start services. The file has been managed by the ASL3 Pi Appliance since its creation. To ensure consistency across installations and upgrades or ASL3 DO NOT use /etc/rc.local to start services.

It has come to light that certain tools, notably DVSwitch is recommending the use of /etc/rc.local to start its services. Use a local Systemd .service file instead. This thread may be updated for other services as necessary.

Fixing DVSwitch after installing ASL3-Pi-Appliance v1.9.0 or later

  1. Delete the file /etc/rc.local with sudo rm -f /etc/rc.local

  2. Create the file /etc/systemd/system/dvswitch.service by pasting the following into a root shell (i.e. sudo -s):

    cat - > /etc/systemd/system/dvswitch.service <<EOF
    [Unit]
    Description=dvswitch
    After=network.target
    
    [Service]
    Type=simple
    ExecStart=/usr/local/sbin/DVSwitch-startup
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
  3. Reload systemd with systemctl daemon-reload && systemctl enable dvswitch.service

  4. Reboot your system and confirm dvswitch still works.