summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-06-11 12:21:39 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-06-11 12:22:00 +0200
commit22669e2a71987a74b588ab02edf7a3a909b645f2 (patch)
tree3ca9e4588351aa7f1695c6f3b57a4f2fa85c06d4 /net-fs
parentmail-mta/postfix: remove old (diff)
downloadgentoo-22669e2a71987a74b588ab02edf7a3a909b645f2.tar.gz
gentoo-22669e2a71987a74b588ab02edf7a3a909b645f2.tar.bz2
gentoo-22669e2a71987a74b588ab02edf7a3a909b645f2.zip
net-fs/samba: Init script improvements.
Bug: https://bugs.gentoo.org/652896 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/files/4.4/samba4.confd23
-rw-r--r--net-fs/samba/files/4.4/samba4.initd-r14
2 files changed, 17 insertions, 10 deletions
diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd
index 58b2c7827bd..2604981f214 100644
--- a/net-fs/samba/files/4.4/samba4.confd
+++ b/net-fs/samba/files/4.4/samba4.confd
@@ -6,6 +6,8 @@
# accordingly.
daemon_list="smbd nmbd"
+piddir="/run/samba"
+
#----------------------------------------------------------------------------
# Daemons calls: <daemon_name>_<command_option>
#----------------------------------------------------------------------------
@@ -17,22 +19,27 @@ my_service_POST=""
# Daemons calls: <daemon_name>_<command_option>
#----------------------------------------------------------------------------
smbd_start_options="-D"
-smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}"
-smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd"
+smbd_command="/usr/sbin/smbd"
+smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec ${smbd_command}"
smbd_reload="killall -HUP smbd"
nmbd_start_options="-D"
-nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
-nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd"
+nmbd_command="/usr/sbin/nmbd"
+nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}"
nmbd_reload="killall -HUP nmbd"
samba4_start_options=""
-samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}"
-samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba"
+samba4_command="/usr/sbin/samba"
+samba4_pidfile="${piddir}/samba4.pid"
+samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}"
+samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}"
samba4_reload="killall -HUP samba"
winbind_start_options=""
-winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}"
-winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd"
+winbind_command="/usr/sbin/winbindd"
+winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --exec ${winbind_command}"
winbind_reload="killall -HUP winbindd"
diff --git a/net-fs/samba/files/4.4/samba4.initd-r1 b/net-fs/samba/files/4.4/samba4.initd-r1
index 52a9b68bba8..05bd1fcfd69 100644
--- a/net-fs/samba/files/4.4/samba4.initd-r1
+++ b/net-fs/samba/files/4.4/samba4.initd-r1
@@ -1,9 +1,9 @@
#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
extra_started_commands="reload"
-piddir="/run/samba"
+[ -z "${piddir}" ] && piddir="/run/samba"
depend() {
after slapd