[Pkg-samba-maint] Bug#572483: samba-common: invoke-rc.d warning when doing system shutdown

Kevin Baradon kevin.baradon at gmail.com
Thu Mar 4 13:25:36 UTC 2010

Package: samba-common
Version: 2:3.4.6~dfsg-1
Severity: minor
Tags: patch

invoke-rc.d warns me during every system shutdown it is invoked in an invalid context.

This command is called by /etc/dhcp3/dhclient-enter-hooks.d/samba to reload samba configuration file on DHCP release (my IP address comes from DHCP server). 
But smbd daemon isn't running anymore at that time (system shutdown).

Following patch checks for PID file existence before calling invoke-rc.d and fixes the warning.

--- samba.orig  2010-03-04 14:12:00.000000000 +0100
+++ samba       2010-03-04 14:24:11.000000000 +0100
@@ -68,7 +68,8 @@

        # reload the samba server
        # We don't necessarily have the samba package installed. #414841
-       [ -x /etc/init.d/samba ] && /usr/sbin/invoke-rc.d samba reload
+       # Samba is not always running
+       [ -x /etc/init.d/samba ] && [ -s /var/run/samba/smbd.pid ] && /usr/sbin/invoke-rc.d samba reload


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.33 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages samba-common depends on:
ii  debconf [debconf-2.0]         1.5.28     Debian configuration management sy
ii  ucf                           3.0025     Update Configuration File: preserv

Versions of packages samba-common recommends:
ii  samba-common-bin          2:3.4.6~dfsg-1 common files used by both the Samb

samba-common suggests no packages.

-- debconf information:
  samba-common/encrypt_passwords: true
* samba-common/dhcp: false
* samba-common/workgroup: WORKGROUP
  samba-common/do_debconf: true

More information about the Pkg-samba-maint mailing list