After upgrade to 16.04 LTS rc.local is not executing a command

On previous installed version kubuntu 15.xx i added a line into /etc/rc.local - /home/diet/scripts/my-auto-mount-script which obviously referred to a script that if on home wifi network drives should be mounted.

This worked flawlessly on kubuntu 15.xx

After the upgrade it seems /etc/rc.local is being ignored on boot because running the command /etc/rc.local still seems to do the trick. The reason I think rc.local is being ignored is because the script it refers to should produce logs on script success but also on script fail, but there are no logs.

Can anyone give me some pointers on how to troubleshoot this matter?

PS : yes I know that putting stuff in /etc/fstab is also a way of mounting the drives, but when I'm not at home I hate it that I can see the drives on dolphin and have those little red crosses on them because the are not there. This way when I'm on the road (it is a laptop) people can't see what i have at home.


Ubuntu is now using systemd, and rc.local is now considered a service which is turned "off" by default. You can turn rc.local "on" by entering the following command and rebooting:

sudo systemctl enable rc-local.service

only change this

chmod 755 /etc/init.d/rc.local

nano /etc/rc.local 

change this in first line

#!/bin/sh -e

to

#!/bin/bash 

save and enjoy!