No subject


Tue Dec 2 03:01:20 GMT 2003


Co
        lis1.ph-freiburg.de") by samba.org with ESMTP id <S26004721AbQGKIwH>;
	Tue, 11 Jul 2000 18:52:07 +1000
Received: from localhost (lauffer at localhost)
	by lis1.ph-freiburg.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id KAA05727
	for <samba-technical at samba.org>; Tue, 11 Jul 2000 10:52:11 +0200
Date:   Tue, 11 Jul 2000 10:52:11 +0200 (CEST)
From:   Stephan Lauffer <lauffer at ph-freiburg.de>
To:     SAMBA-TECHNICAL <samba-technical at samba.org>
Subject: need the PID of the running smbd  - Probs with %d
Message-ID: <Pine.LNX.4.21.0007111026270.364-100000 at lis1.ph-freiburg.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: 8BIT
Return-Path: <lauffer at ph-freiburg.de>
X-Orcpt: rfc822;samba-technical at samba.org

Hi all!

Need the PID of the smbd for the actual share... %d sounds good:
"%d = The process id of the current server  process." says man smb.conf

I´ve a problem (am i right or not (super trivial test)):
(samba 2.0.7)

--- smb.conf ---
[test]
   path=/tmp
   root preexec = /tmp/smb.pl %d
   indlude = /tmp/smb.%d.inc
---

--- smb.pl ---
#!/usr/bin/perl -w

@input=@ARGV;

system ("echo \"path=/usr\"  > /tmp/smb.$input[0].inc");
system ("killall -HUP smbd");	# smbd should reload his config...
---

Now i get the following:
---
lisa:/ # testparm | grep "test" -A 3 && ps faucx | grep "smbd"

[test]
      path = /tmp
      include = /tmp/smb.26090.inc
      root preexec = /tmp/smb.pl %d
root      1014  0.0  0.7  3180 1936 ?        S    Jul05   0:00 vmware-smbd
root     22637  0.0  0.4  2476 1140 ?        S    Jul10   0:00 smbd
root     25776  0.0  0.9  3624 2368 ?        S    09:30   0:00  \_ smbd
lauffer  26065  0.0  0.5  3640 1352 ?        S    10:39   0:00  \_ smbd
---

Ups! Why is %d 26090 ?!
May I understand %d wrong... I thought it tells me the PID of the smbd
for the share. Or... hm... will the PID be changed?

Thanx for help!

Liebe Gruesse,
Stephan Lauffer

[ Paedagogische Hochschule Freiburg - Systemtechnik - Germany    ]
[ Abteilung ZIK: <a href="http://www.ph-freiburg.de/zik">WWW</a> ]




More information about the samba-technical mailing list