Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 414439 - media-video/motion dies with "cannot create process id file (pid file)"
Summary: media-video/motion dies with "cannot create process id file (pid file)"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-03 04:30 UTC by David
Modified: 2012-05-04 01:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,4.66 KB, text/plain)
2012-05-03 04:30 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2012-05-03 04:30:20 UTC
Created attachment 310655 [details]
emerge --info

After a fresh install of media-video/motion-3.2.12-r2, running the program dies with the following error message:

[0] Exit motion, cannot create process id file (pid file) /var/run/motion/motion.pid: No such file or directory



Manually running "mkdir /var/run/motion" fixes the issue.


This may not be completely obvious to every user, and it seems this step could be completed as part of the install.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-05-03 04:56:17 UTC
Did you forget to run etc-update or dispatch-conf? The init script does create the missing directory on it's own as per.

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-video/motion/files/motion.initd-r2?hideattic=0&revision=1.1&view=markup

Look for the _create_motion_run_dir() function.

Or you can backup your motion conf (!!!) and do following to overwrite the old init script with force:

emerge --noconfmem motion

*** This bug has been marked as a duplicate of bug 332633 ***
Comment 2 David 2012-05-03 15:16:42 UTC
(In reply to comment #1)
> Did you forget to run etc-update or dispatch-conf? The init script does
> create the missing directory on it's own as per.


I didn't forget to run dispatch-conf.   The reason the director wasn't there was because I started "motion" directly, instead of using /etc/init.d/


Thanks for your time/help.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2012-05-03 17:18:49 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Did you forget to run etc-update or dispatch-conf? The init script does
> > create the missing directory on it's own as per.
> 
> 
> I didn't forget to run dispatch-conf.   The reason the director wasn't there
> was because I started "motion" directly, instead of using /etc/init.d/
> 
> 
> Thanks for your time/help.

Alright. The reason the job is left for an init script to handle is that some (most) people have /var/run on a tmpfs which gets wiped on every boot -- so creating it from a ebuild directly would be pointless.

So yeah, the only way to run motion is through the init script -- or by writing a own script.

But glad this got sorted out...
Comment 4 David 2012-05-04 01:22:11 UTC
So, perhaps a post-emerge message to the user would be helpful for this, to notify the user about benefit of the /etc/init.d/motion file.

Sorry, I won't keep posting on this closed bug.