From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Dec 7 07:20:10 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24E4E16A492 for ; Thu, 7 Dec 2006 07:20:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07DE143CB1 for ; Thu, 7 Dec 2006 07:19:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB77K7x1010532 for ; Thu, 7 Dec 2006 07:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB77K7kS010531; Thu, 7 Dec 2006 07:20:07 GMT (envelope-from gnats) Resent-Date: Thu, 7 Dec 2006 07:20:07 GMT Resent-Message-Id: <200612070720.kB77K7kS010531@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Rashid N. Achilov" Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18B4916A403 for ; Thu, 7 Dec 2006 07:13:18 +0000 (UTC) (envelope-from shelton@master.askd.ru) Received: from to-495.askd.ru (master.askd.ru [80.242.75.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8782C43CAE for ; Thu, 7 Dec 2006 07:12:26 +0000 (GMT) (envelope-from shelton@master.askd.ru) Received: from to-495.askd.ru (IDENT:shelton@localhost.askd.ru [127.0.0.1]) by to-495.askd.ru (8.13.6/8.13.6) with ESMTP id kB77DERI053826 for ; Thu, 7 Dec 2006 13:13:14 +0600 (NOVT) (envelope-from shelton@master.askd.ru) Received: (from shelton@localhost) by to-495.askd.ru (8.13.6/8.13.6/Submit) id kB77DEtm053825; Thu, 7 Dec 2006 13:13:14 +0600 (NOVT) (envelope-from shelton) Message-Id: <200612070713.kB77DEtm053825@to-495.askd.ru> Date: Thu, 7 Dec 2006 13:13:14 +0600 (NOVT) From: "Rashid N. Achilov" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/106436: Samba startup script uses old PID files naming scheme X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Rashid N. Achilov" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2006 07:20:10 -0000 >Number: 106436 >Category: ports >Synopsis: Samba startup script uses old PID files naming scheme >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 07 07:20:06 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Rashid N. Achilov >Release: FreeBSD 6.1-RELEASE i386 >Organization: LLC "AS-System Complex" >Environment: System: FreeBSD to-495.askd.ru 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Tue Oct 31 13:28:26 NOVT 2006 root@sentry.askd.ru:/usr/obj/usr/src/sys/Sentry i386 >Description: Samba startup script 'samba', placed into /usr/local/etc/rc.d, incorrectly detects their PID file names and try to use 'smbd.pid','nmbd.pid' and 'winbindd.pid', but Samba now produces 'smbd-smb,conf.pid', 'nmbd-smb.conf.pid' and 'winbindd-smb.conf.pid' files. So, user cannot stop or restart Samba, it must kill it manually >How-To-Repeat: Install Samba 3.0.23d Start it. Try to restart or stop. Script samba suddenly says: smbd not running? and so on >Fix: --- pidfilesh.patch begins here --- --- samba.old.old Thu Dec 7 10:25:13 2006 +++ samba.old Thu Dec 7 13:03:09 2006 @@ -47,6 +47,9 @@ samba_daemons="${samba_daemons} winbindd" testparm_command="/usr/local/bin/testparm" smbcontrol_command="/usr/local/bin/smbcontrol" + +short_cfgname=${samba_config##*/} + # Fetch parameters from configuration file samba_parm="${testparm_command} -s -v --parameter-name" samba_idmap=$(${samba_parm} 'idmap uid' ${samba_config} 2>/dev/null) @@ -123,7 +126,7 @@ for name in ${samba_daemons}; do rcvar=$(set_rcvar) command="/usr/local/sbin/${name}" - pidfile="/var/run/${name}.pid" + pidfile="/var/run/${name}-${short_cfgname}.pid" # Daemon should be enabled and running if [ -n "${rcvar}" ] && checkyesno ${rcvar}; then if [ -n "$(check_pidfile "${pidfile}" "${command}")" ]; then @@ -147,7 +150,7 @@ for name in ${samba_daemons}; do rcvar=$(set_rcvar) command="/usr/local/sbin/${name}" - pidfile="/var/run/${name}.pid" + pidfile="/var/run/${name}-${short_cfgname}.pid" run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args} done --- pidfilesh.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: