Motion complains about not being able to create pid file on computer start up. Runs just fine in daemon mode with manual start.
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| motion (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: motion
motion.pid is not created. I noticed there was no motion directory in /var/run. I purged motion and reinstalled using Ubuntu Software Center, which is how I originally installed. For purging I used Synaptic. Upon reinstall, the motion directory was created in /var/run. Upon "$ sudo service motion start" in motion directory in /var/run/motion there was no motion.pid file seen. I have no idea why motion is not creating the pid file. However I am eager to debug motion if you tell me how to do it.
I originally noticed a problem in motion upon reboot of my computer. Motion did not start and complained about not being able to create pid file. And there was no motion directory in /var/run. Manually starting motion using "$ sudo service motion start" the daemon runs just fine, but no pid file is created.
/etc/default/motion daemon is set to yes.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: motion (not installed)
ProcVersionSign
Uname: Linux 2.6.32-25-generic x86_64
NonfreeKernelMo
Architecture: amd64
CheckboxSubmission: f28209556208bad
CheckboxSystem: 6ce041aeed0a2c1
Date: Wed Oct 20 12:17:47 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
ProcEnviron:
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: motion

This is obviously because the /var/run directory is mounted with tmpfs so on reboot the /var/run/motion directory is deleted.
The init script will have to check this directory exists and create it with owner and group "motion" before dropping privs to run the daemon.