Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346087 - net-fs/samba: init.d scripts should use `checkpath` with /var/run paths
Summary: net-fs/samba: init.d scripts should use `checkpath` with /var/run paths
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 15:45 UTC by Xake
Modified: 2010-12-20 20:34 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2010-11-19 15:45:39 UTC
If you run your system with /var/run as tmpfs that directory gets emptied every reboot, resulting in /var/run/samba being removed. Since net-fs/samba in gentoo relies on this directory existing samba then fails to start.

So there are two solutions to this, either have samba init script create /var/run/samba on start if it does not exists, or have samba use /var/run directly. I leave the choice up to the maintainer.
Comment 1 Alec Meyers 2010-11-20 15:28:49 UTC
You're not supposed to wipe the contents of /var/run; see Bug 177736, for instance.
Comment 2 Xake 2010-11-21 21:32:34 UTC
but then we got bug #332397 and especially the last comment therein.

also this feels a bit like a non-issue.
adding a "[ -d /var/run/samba ]  || mkdir -p /var/run/samba" seems not like something that needs arguing about when some people like me think /var/run should be fully volatile, and some does not depending on how they intepret fhs (which by the way states: "Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process." so the argument about wiping /var/run is mostly about if this should be interpreted as if the same holds true for directories in /var/run and not only files).
Comment 3 SpanKY gentoo-dev 2010-12-01 14:30:31 UTC
the exact reason for /var/run being nuked doesnt matter too much.  people shouldnt have to re-emerge a package just to create a few dirs/files in it.
Comment 4 Víctor Ostorga (RETIRED) gentoo-dev 2010-12-20 20:34:38 UTC
Now init script creates /var/run/samba if it doesn't exist.