this is a follow up on bug #332397 Summary from of my problem from that bug is that it seems that 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." Jeremy pointed out that this is a bug in the initscript for vnstatd, and told me to open this bug. Suggested fixes was to have the init script create the directory or use /var/run directly.
Created attachment 251631 [details] vnstatd.initd-r1 I've got same bug, so i've written a patched init script. There is it's diff: --- vnstatd 2010-10-22 23:46:32.000000000 +0400 +++ /etc/init.d/vnstatd 2010-10-22 23:48:21.000000000 +0400 @@ -13,6 +13,7 @@ start() { ebegin "Starting vnstatd" + checkpath -q -d -m 755 -o vnstat:vnstat /var/run/vnstatd start-stop-daemon --start --quiet \ --pidfile "${VNSTATD_PIDFILE}" \ --chuid vnstat:vnstat \
Created attachment 251633 [details] vnstatd.initd-r2 This is second version of init script for vnstatd. It get's dirname of pidfile, but it adds dependency on program "dirname" from coreutils. Diff with current gentoo script: --- vnstatd 2010-10-22 23:46:32.000000000 +0400 +++ /etc/init.d/vnstatd 2010-10-22 23:56:14.000000000 +0400 @@ -13,6 +13,7 @@ start() { ebegin "Starting vnstatd" + checkpath -q -d -m 755 -o vnstat:vnstat `dirname ${VNSTATD_PIDFILE}` start-stop-daemon --start --quiet \ --pidfile "${VNSTATD_PIDFILE}" \ --chuid vnstat:vnstat \
Fixed. Thanks for reporting and for the patch.