rc.local does not execute at startup.

ozgurerdogan

Renowned Member
May 2, 2010
610
5
83
Bursa, Turkey, Turkey
I need to automount sshfs so I added needed line to rc.local file.
My problem is only the rc.local not executing (although it is 755 and so should be executed). I don't have the map problem.
if I run "/etc/rc.local" from shell, it correctly executes! It just doesn't run at boot
 
I need to automount sshfs so I added needed line to rc.local file.
My problem is only the rc.local not executing (although it is 755 and so should be executed). I don't have the map problem.
if I run "/etc/rc.local" from shell, it correctly executes! It just doesn't run at boot
It may be due to lack of execution bit.
Do this:

# chmod +x /etc/rc.local
 
It may be due to lack of execution bit.
Do this:

# chmod +x /etc/rc.local
BTW, don't forget the following single line at the top of the rc.local file:

#!/bin/sh -e

And, don't forget the following single line at the end of the rc.local file:

exit 0

If you forget them, the OS won't run the whole of script!
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!