[Pkg-samba-maint] [samba] 01/01: Don't drop the samba init script after all, we want this as a wrapper for compatibility in both the sysvinit and upstart case.
Steve Langasek
vorlon at alioth.debian.org
Wed Aug 14 23:41:33 UTC 2013
This is an automated email from the git hooks/post-receive script.
vorlon pushed a commit to branch init-script-split-and-upstart-jobs
in repository samba.
commit 7c67ef5af3d59fc4b15be5bef0fccbba433309b9
Author: Steve Langasek <steve.langasek at canonical.com>
Date: Tue Aug 13 09:57:55 2013 +0200
Don't drop the samba init script after all, we want this as a wrapper for
compatibility in both the sysvinit and upstart case.
---
debian/rules | 1 +
debian/samba.init | 43 +++++++++++++++++++++++++++++++++++++++++++
debian/samba.maintscript | 1 -
debian/samba.postinst | 2 --
4 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/debian/rules b/debian/rules
index 56ec0fc..5da11d3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -115,6 +115,7 @@ endif
override_dh_installinit:
ifneq (,$(filter samba, $(shell dh_listpackages)))
+ dh_installinit -psamba
dh_installinit -psamba --name smbd
dh_installinit -psamba --name nmbd
dh_installinit -psamba --no-start --name reload-smbd
diff --git a/debian/samba.init b/debian/samba.init
new file mode 100644
index 0000000..7374de3
--- /dev/null
+++ b/debian/samba.init
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: samba
+# Required-Start: smbd nmbd
+# Required-Stop: smbd nmbd
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: ensure Samba daemons are started (nmbd and smbd)
+### END INIT INFO
+
+set -e
+
+case $1 in
+ start)
+ /etc/init.d/nmbd start
+ /etc/init.d/smbd start
+ ;;
+ stop)
+ /etc/init.d/smbd stop
+ /etc/init.d/nmbd stop
+ ;;
+ reload)
+ /etc/init.d/smbd reload
+ ;;
+ restart|force-reload)
+ /etc/init.d/nmbd "$1"
+ /etc/init.d/smbd "$1"
+ ;;
+ status)
+ status=0
+ NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null`
+ if [ "$NMBD_DISABLED" != "Yes" ]; then
+ /etc/init.d/nmbd status || status=$?
+ fi
+ /etc/init.d/smbd status || status=$?
+ exit $status
+ ;;
+ *)
+ echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}"
+ exit 1
+ ;;
+esac
diff --git a/debian/samba.maintscript b/debian/samba.maintscript
index 32d8e06..91bcd64 100644
--- a/debian/samba.maintscript
+++ b/debian/samba.maintscript
@@ -1,2 +1 @@
rm_conffile /etc/network/if-up.d/samba 2:3.6.5-6~ samba
-rm_conffile /etc/init.d/samba 2:3.6.15-2~ samba
diff --git a/debian/samba.postinst b/debian/samba.postinst
index 8862971..79445e1 100644
--- a/debian/samba.postinst
+++ b/debian/samba.postinst
@@ -71,6 +71,4 @@ update-alternatives --install /usr/bin/smbstatus smbstatus /usr/bin/smbstatus.sa
#DEBHELPER#
-update-rc.d samba remove > /dev/null
-
exit 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list