I have for various reasons /var/run mounted as tmpfs and when I today tried to figure out why vnstatd did not start it turned out to be because of a pidfile problem. As it seems the ebuild for vnstatd creates /var/run/vnstatd and chown it to vnstat:vnstat. Then start-stop-daemon starts vnstatd creating and placing a vnstatd.pid in that directory with chuid vnstat:vnstat. This works fine as long as /var/run is an permanent filesystem. However if /var/run is mounted tmpfs the directory gets wiped evey reboot resulting in /var/run/vnstatd being non-existing on the next reboot. I propose that if start-stop-daemon is started with the following: start-stop-daemon --pidfile /var/run/<directory>/<pidfile>.pid --chuid <user>:<group> then start-stop-daemon should create the path "/var/run/<directory>" and chown it to "<user>:<group>" if it does not already exist.
This is usually the job for the init script. It should either make sure that the directory under /var/run exists or it should write the PID file under /var/run directly.
It is completely legal for /var/run to be cleared upon system boot. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA For that, I am closing this bug, you can (and should) file a bug report for vnstatd. As Eray stated, vnstatd should create its own directory or just use /var/run/ directly. Thanks.