summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2007-04-09 08:17:46 +0000
committerTiziano Müller <dev-zero@gentoo.org>2007-04-09 08:17:46 +0000
commitcf61e0f43d49a5ad29cab14e41843d58e3ca5de5 (patch)
treed2f6c6c7bf0ef6678010d3db209c02a84190806f /net-fs/samba/files/samba-init
parentStable on amd64 wrt bug 173793 (diff)
downloadgentoo-2-cf61e0f43d49a5ad29cab14e41843d58e3ca5de5.tar.gz
gentoo-2-cf61e0f43d49a5ad29cab14e41843d58e3ca5de5.tar.bz2
gentoo-2-cf61e0f43d49a5ad29cab14e41843d58e3ca5de5.zip
Removed obsolete patches. Moved conf.d/init.d files out of the tarball. Fixed bug #170072 (thanks to Roy Marples)
(Portage version: 2.1.2.2)
Diffstat (limited to 'net-fs/samba/files/samba-init')
-rw-r--r--net-fs/samba/files/samba-init50
1 files changed, 50 insertions, 0 deletions
diff --git a/net-fs/samba/files/samba-init b/net-fs/samba/files/samba-init
new file mode 100644
index 000000000000..d1f17b882c00
--- /dev/null
+++ b/net-fs/samba/files/samba-init
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.13 2007/04/09 08:17:46 dev-zero Exp $
+
+opts="reload"
+
+depend() {
+ after slapd
+ need net
+ use cupsd
+}
+
+signal_do() {
+ local signal="$1"
+ [ -z "${signal}" ] && return 0
+
+ local result=0 last_result=0 daemon= cmd_exec=
+ for daemon in ${daemon_list} ; do
+ eval cmd_exec=\$${daemon}_${signal}
+ if [ -n "${cmd_exec}" ]; then
+ ebegin "${my_service_name} -> ${signal}: ${daemon}"
+ #echo ${cmd} '->' ${!cmd}
+ ${cmd_exec} > /dev/null
+ last_result=$?
+ eend ${last_result}
+ fi
+ result=$(( ${result} + ${last_result} ))
+ done
+ return ${result}
+}
+start() {
+ ${my_service_PRE}
+ signal_do start && return 0
+
+ eerror "Error: starting services (see system logs)"
+ signal_do stop
+ return 1
+}
+stop() {
+ ${my_service_PRE}
+ if signal_do stop ; then
+ ${my_service_POST}
+ return 0
+ fi
+}
+reload() {
+ ${my_service_PRE}
+ signal_do reload
+}