Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 440728 - net-fs/samba-4.0.0_rc4 - ERROR: can't open /var/run/samba/samba.pid: Error was No such file or directory
Summary: net-fs/samba-4.0.0_rc4 - ERROR: can't open /var/run/samba/samba.pid: Error wa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-01 13:24 UTC by Claude
Modified: 2012-11-08 14:56 UTC (History)
2 users (show)

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 Claude 2012-11-01 13:24:18 UTC
samba emerged and started after emerge fine, but after reboot got this error in /var/log/samba/log.samba
[2012/11/01 17:13:11,  0] ../source4/smbd/server.c:369(binary_smbd_main)
  samba version 4.0.0rc4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2012
[2012/11/01 17:13:11,  0] ../lib/util/pidfile.c:117(pidfile_create)
  ERROR: can't open /var/run/samba/samba.pid: Error was No such file or directory

if i do:
# mkdir -p /var/run/samba/
# touch /var/run/samba/samba.pid
# /etc/init.d/samba start

samba will start, but after next reboot this epic repeats :(
Comment 1 Claude 2012-11-02 09:10:10 UTC
this is my fix for samba's runscript

+start_pre() {
+        # Create a directory if not exists
+        checkpath --directory /var/run/samba/
+}

start() {
        ebegin "Starting samba"
-start-stop-daemon --start --exec /usr/sbin/samba
+start-stop-daemon --start --make-pidfile --pidfile /var/run/samba/samba.pid --exec /usr/sbin/samba
        eend $?
}
Comment 2 Torsten Kurbad 2012-11-07 16:40:51 UTC
(In reply to comment #1)
> this is my fix for samba's runscript

Looks plausible to me.

Can the maintainer please check that into the tree?
Comment 3 Víctor Ostorga (RETIRED) gentoo-dev 2012-11-08 14:56:31 UTC
+  08 Nov 2012; Víctor Ostorga <vostorga@gentoo.org> files/4.0/samba4.initd,
+  -samba-3.5.17.ebuild, -samba-3.6.7.ebuild, -samba-3.6.8.ebuild,
+  -samba-4.0.0_alpha17.ebuild, -samba-4.0.0_rc1.ebuild,
+  -samba-4.0.0_rc2.ebuild:
+  Cleaning up old ebuilds. Fixing up non existant samba.pid condition. Patch
+  thanks to Claude <gta3user@ya.ru>