[Pkg-samba-maint] r3427 - trunk/samba/debian
bubulle at alioth.debian.org
bubulle at alioth.debian.org
Sat Apr 10 05:49:26 UTC 2010
tags 576415 pending
tags 462169 pending
thanks
Author: bubulle
Date: 2010-04-10 05:49:22 +0000 (Sat, 10 Apr 2010)
New Revision: 3427
Added:
trunk/samba/debian/samba.if-up
Modified:
trunk/samba/debian/changelog
trunk/samba/debian/rules
trunk/samba/debian/samba.files
Log:
add an if-up.d script for samba to try to start nmbd, if it's not
running because /etc/init.d/samba ran before the network was up at
boot time. Closes: #576415, LP: #462169.
Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog 2010-04-10 05:01:34 UTC (rev 3426)
+++ trunk/samba/debian/changelog 2010-04-10 05:49:22 UTC (rev 3427)
@@ -12,6 +12,9 @@
removal :/
* Fix winbind.pam-config to not interfere with password changes for
non-winbind accounts. Closes: #573323, LP: #546874.
+ * debian/samba.if-up, debian/rules: add an if-up.d script for samba to
+ try to start nmbd, if it's not running because /etc/init.d/samba ran
+ before the network was up at boot time. Closes: #576415, LP: #462169.
-- Christian Perrier <bubulle at debian.org> Wed, 24 Mar 2010 22:02:25 +0100
Modified: trunk/samba/debian/rules
===================================================================
--- trunk/samba/debian/rules 2010-04-10 05:01:34 UTC (rev 3426)
+++ trunk/samba/debian/rules 2010-04-10 05:49:22 UTC (rev 3427)
@@ -179,6 +179,8 @@
# correct place by dh_movefiles.
cp debian/gdbcommands $(DESTDIR)/etc/samba/
install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d/samba
+ mkdir -p $(DESTDIR)/etc/network/if-up.d
+ install -o root -g root debian/samba.if-up $(DESTDIR)/etc/network/if-up.d/samba
dh_movefiles
dh_installpam --name=samba
Modified: trunk/samba/debian/samba.files
===================================================================
--- trunk/samba/debian/samba.files 2010-04-10 05:01:34 UTC (rev 3426)
+++ trunk/samba/debian/samba.files 2010-04-10 05:49:22 UTC (rev 3427)
@@ -17,3 +17,4 @@
usr/share/man/man8/mksmbpasswd.8
usr/share/man/man8/tdbbackup.8
usr/share/man/man8/eventlogadm.8
+etc/network/if-up.d/samba
Added: trunk/samba/debian/samba.if-up
===================================================================
--- trunk/samba/debian/samba.if-up (rev 0)
+++ trunk/samba/debian/samba.if-up 2010-04-10 05:49:22 UTC (rev 3427)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Try to bring nmbd up when an interface comes up, if smbd is already running.
+
+# Don't bother to do anything for lo.
+if [ "$IFACE" = lo ]; then
+ exit 0
+fi
+
+# Only run from ifup.
+if [ "$MODE" != start ]; then
+ exit 0
+fi
+
+# Samba only cares about inet and inet6. Get thee gone, strange people
+# still using ipx.
+if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
+ exit 0
+fi
+
+status=$(/etc/init.d/samba status)
+
+# Really only necessary to do anything if nmbd is not already running
+if echo "$status" | grep -q 'smbd is running' \
+ && ! echo "$status" | grep -q 'nmbd is running'
+then
+ /etc/init.d/samba start
+fi
+
+exit 0
More information about the Pkg-samba-maint
mailing list