Forum
[PROBLEM] Services start before USB mount - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: [PROBLEM] Services start before USB mount (/thread-4020.html)



Services start before USB mount - palswim - 20th Mar, 2019 03:47 PM

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?


RE: Services start before USB mount - Nachteule - 21st Mar, 2019 12:33 AM

(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?