Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 836328

Summary: net-misc/minidlna-1.3.0-r2 (possibly other versions): minidlnad crashes when started by init
Product: Gentoo Linux Reporter: Phil Stracchino (Unix Ronin) <phils>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal CC: jstein, phils, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to /etc/init.d/minidlna to fix crash on startup

Description Phil Stracchino (Unix Ronin) 2022-03-28 16:13:50 UTC
net-misc/minidlna-1.3.0-r2 consistently crashes on start if started by OpenRC (and possibly by other startup methods), but starts correctly if launched manually.

The problem here appears to lie in the start_stop_daemon invocation.  It seems the user and group are not being correctly passed to minidlnad.  Changing /etc/init.d/minidlna from:

command_args="-P $pidfile -f $CONFIG"
start_stop_daemon_args="--user ${M_USER}:${M_GROUP}"

to:

command_args="-P $pidfile -f $CONFIG -u ${M_USER} -g ${M_GROUP}"
start_stop_daemon_args=''

appears, in my case at least, to resolve the problem.

Patch attached.



Reproducible: Always
Comment 1 Phil Stracchino (Unix Ronin) 2022-03-28 16:14:54 UTC
Created attachment 768080 [details, diff]
Patch to /etc/init.d/minidlna to fix crash on startup