Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[PROBLEM] Services start before USB mount
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Problem: Services start before USB mount
20th Mar, 2019, 03:47 PM
Post: #1
palswim Offline
Registered
Posts: 42
Joined: Feb 2014
Reputation: 2
Services start before USB mount
My Pi mounts its USB drives faithfully at /media/LABEL on every boot. However, some services start before the mount has happened, minidlna and transmission-daemon to name two.

The Transmission service file (/etc/init/transmission-daemon.conf) indicates that the Upstart service will start on the filesystem and net-device-up IFACE=lo triggers and the minidlna init script (/etc/init.d/minidlna) indicates that the service will start on the $local_fs $network $remote_fs triggers. But, none of these triggers prevent the service from starting before the mount of my USB drives have finished, leading the services to treat files in those locations as missing.

Should I modify the Upstart configuration files and init scripts to wait on a different trigger set? If so, upon which events should it wait?
Find all posts by this user
Quote this message in a reply
21st Mar, 2019, 12:33 AM
Post: #2
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: Services start before USB mount
(20th Mar, 2019 03:47 PM)palswim Wrote:  My Pi mounts its USB drives faithfully at /media/LABEL on every boot. However, some services start before the mount has happened, minidlna and transmission-daemon to name two.

The Transmission service file (/etc/init/transmission-daemon.conf) indicates that the Upstart service will start on the filesystem and net-device-up IFACE=lo triggers and the minidlna init script (/etc/init.d/minidlna) indicates that the service will start on the $local_fs $network $remote_fs triggers. But, none of these triggers prevent the service from starting before the mount of my USB drives have finished, leading the services to treat files in those locations as missing.

It's a bit complicated to use a trigger event, because mounting of external disks is completely async triggered by udev.

Quote:Should I modify the Upstart configuration files and init scripts to wait on a different trigger set? If so, upon which events should it wait?

This is bad idea, because those files will be overwritten if package which owned that script will be updated

Wouldn't it be better to put those mounts into /etc/fstab?
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  How to mount NFS (MY Cloud) on Start up? ravi_buz 1 6,517 15th Jul, 2014 01:46 AM
Last Post: IriDium

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 21st May, 2025, 05:41 AM Powered By MyBB, © 2002-2025 MyBB Group.