On a power reset, I have to enter the following two lines:
sudo systemctl daemon-reload
sudo systemctl daemon-reloadsudo systemctl daemon-reload
How can I set this up so I don’t have to keep doing this?
Thanks.
Tony
On a power reset, I have to enter the following two lines:
sudo systemctl daemon-reload
sudo systemctl daemon-reloadsudo systemctl daemon-reload
How can I set this up so I don’t have to keep doing this?
Thanks.
Tony
There is a wiki for that…
I did see that and added those two lines to /etc/rc.local.
Is there something else I have to do?
osmc@osmc:/etc$ cat rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sudo systemctl daemon-reload
sudo systemctl daemon-reloadsudo systemctl daemon-reload
osmc@osmc:/etc$
I see the second line your running is a bad command and is just the first command repeated twice in such a way that it does nothing but spit out an error. What is the setup your needing to run that to get your shares working?
Sorry… the two lines added to rc.local are:
sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target
On a power reset, I still have to remote login to the pi and execute those two lines to see my movies
Perhaps they need to run after Kodi loads so you would need to go the systemd route. This isn’t something I’ve personally had any experience with, but I see the wiki has a section covering that option as well.
I just tried the systemd route with the same result.
My steps were:
cd /home/osmc
mkdir scripts
cd scripts
*** create a file there called startup_script.sh with those two lines
chmod +x startup_script.sh
cd /lib/systemd/system
*** create a service file called test.service with the following:
[Unit]
Description = A systemboot log
After = network-online.target mediacenter.service
[Service]
Type = simple
ExecStart = /home/osmc/scripts/startup_script.sh
[Install]
WantedBy = multi-user.target
*** then run the following commands
sudo systemctl daemon-reload
sudo systemctl enable test.service
sudo systemctl start test.service
BTW on my other pi4 setup, I don’t have to run those two commands after a power reset
I’m going to defer to someone more knowledgeable to the topic at hand. I assume one of the other mods or users with more Linux knowledge than myself should chime in at some point.
Hi,
Have you got Wait for Network enabled in MyOSMC?
Also how are you mounting the shares? Sounds like osmc is trying to mount the shares before the network is up.
Regards Tom.
Hi Tom,
Yes. I have Wait for Network enabled in OSMC.
I believe that I’m using autofs to mount shares.
Tony
Hi,
Could you post some logs please? So we can see what’s going on.
Regards Tom.
Logs at https://paste.osmc.tv/dupatogaqe
Hi,
Not sure what the issue is, but something doesn’t look right. Did you use this guide when setting up the shares:
Regards Tom.
I originally was using fstab and switched to mounting shares with autofs.
I forgot to comment out the line line in fstab.
Thanks for helping me solve this.
Tiny