How to guarantee one process precedes another at startup?

Chris Green cl at isbd.net
Sun Jul 19 20:34:28 UTC 2020


On Sun, Jul 19, 2020 at 09:36:24PM +0200, Ralf Mardorf via ubuntu-users wrote:
> On Sun, 19 Jul 2020 18:53:40 +0100, Chris Green wrote:
> >I run the minidlna daemon to provide DLNA services on my system.  I
> >also run mp3fs to convert much of my music from flac to mp3 'on the
> >fly' as it were.
> >
> >The minidlna daemon us started in the normal way and has an entry in
> >/etc/init.d but mp3fs is started from /etc/rc.local.  Unfortunately
> >this means that minidlna gets started before mp3fs and that means it
> >doesn't see the files created by mp3fs.
> 
> The 'normal' way would be to start it by a systemd unit.
> 
Well, yes, but it's as installed from the Ubuntu repositaries, that's
what I meant by 'normall'.


> >How can I guarantee that minidlna waits for mp3fs?  I want to do this
> >'properly' if I can.  Obviously I *could* just remove minidlna from
> >/etc/init.d and put it in /etc/rc.local after mp3fs but that feels
> >like a bit of a bodge.  Is there a better way?
> 
> How should mp3fs get started by either an init script or a systemd unit?

Er, neither as far as I know. :-)  As installed from the repositories
it's just an executable run on request by a user.


> IIUC fuse does this on demand. IOW you need to ensure that the fuse
> (bridge) module isn't blacklisted (I'm aware that the terms
> 'blacklisted' and 'slave' became a taboo a few days ago, but actually
> it's still the correct term). IIUC you either need a /lib/udev/rules.d/
> file or an entry in /etc/modprobe{,.d/foo}.
> 
> Arch Linux packages provide udev rules:
> 
> $ pacman -Qo /usr/lib/udev/rules.d/99-fuse*rules
> /usr/lib/udev/rules.d/99-fuse.rules is owned by fuse2 2.9.9-4
> /usr/lib/udev/rules.d/99-fuse3.rules is owned by fuse3 3.9.2-1
> 
> The Ubuntu path should be /lib/udev/rules.d/ without /user. Each distro
> has got it's individual Linux Standard Base (LSB). 
> 
As installed there's nothing in /lib/udev/rules.d/ for either minidlna
or mp3fs.

-- 
Chris Green




More information about the ubuntu-users mailing list