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

Bug 411857

Summary: media-sound/logitechmediaserver-bin fails to start when /var/run/logitechmediaserver is missing
Product: Gentoo Linux Reporter: Roy Thompson <roy>
Component: New packagesAssignee: Joe Peterson (RETIRED) <lavajoe>
Status: RESOLVED FIXED    
Severity: normal CC: stuart
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 251494    
Attachments: patch to files/logitechmediaserver.init.d
checkpath patch to logitechmediaserver.init.d

Description Roy Thompson 2012-04-13 12:59:24 UTC
/var/run can be mounted tmpfs and cleared during a reboot.  Hence, programs (or
their init scripts) should not rely on dirs under /var/run and should create
them if necessary instead.

logitechmediaserver fails to start when /var/run/logitechmediaserver is missing.

The attached patch to the init script calls checkpath to ensure this directory exists when the service is started.

Reproducible: Always

Steps to Reproduce:
1. remove /var/run/logitechmediaserver
2. try to start the service

Actual Results:  
logitechmediaserver fails to start

Expected Results:  
logitechmediaserver should start

This is a new bug based on 402399, which was the same issue for squeezeboxserver.
Comment 1 Roy Thompson 2012-04-13 13:00:16 UTC
Created attachment 308763 [details, diff]
patch to files/logitechmediaserver.init.d
Comment 2 Stuart Hickinbottom 2012-04-15 20:06:13 UTC
Created attachment 309079 [details, diff]
checkpath patch to logitechmediaserver.init.d

Thanks for the patch. I've looked at this and tested it and it's working fine.

I did a little reading around and I believe start_pre() is the correct place to do this correction (there are a number of other init scripts that do this). My version which takes this approach is attached.

Joe, I think this is OK to apply as a minor update.
Comment 3 Joe Peterson (RETIRED) gentoo-dev 2012-04-28 23:50:40 UTC
Looks great - committed!  No version bump, since the problem case is probably a bit rare, and they'll likely find this bug and re-install.