1 |
commit: 22669e2a71987a74b588ab02edf7a3a909b645f2 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 11 10:21:39 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 11 10:22:00 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22669e2a |
7 |
|
8 |
net-fs/samba: Init script improvements. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/652896 |
11 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
12 |
|
13 |
net-fs/samba/files/4.4/samba4.confd | 23 +++++++++++++++-------- |
14 |
net-fs/samba/files/4.4/samba4.initd-r1 | 4 ++-- |
15 |
2 files changed, 17 insertions(+), 10 deletions(-) |
16 |
|
17 |
diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd |
18 |
index 58b2c7827bd..2604981f214 100644 |
19 |
--- a/net-fs/samba/files/4.4/samba4.confd |
20 |
+++ b/net-fs/samba/files/4.4/samba4.confd |
21 |
@@ -6,6 +6,8 @@ |
22 |
# accordingly. |
23 |
daemon_list="smbd nmbd" |
24 |
|
25 |
+piddir="/run/samba" |
26 |
+ |
27 |
#---------------------------------------------------------------------------- |
28 |
# Daemons calls: <daemon_name>_<command_option> |
29 |
#---------------------------------------------------------------------------- |
30 |
@@ -17,22 +19,27 @@ my_service_POST="" |
31 |
# Daemons calls: <daemon_name>_<command_option> |
32 |
#---------------------------------------------------------------------------- |
33 |
smbd_start_options="-D" |
34 |
-smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}" |
35 |
-smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd" |
36 |
+smbd_command="/usr/sbin/smbd" |
37 |
+smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}" |
38 |
+smbd_stop="start-stop-daemon --stop --exec ${smbd_command}" |
39 |
smbd_reload="killall -HUP smbd" |
40 |
|
41 |
nmbd_start_options="-D" |
42 |
-nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}" |
43 |
-nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd" |
44 |
+nmbd_command="/usr/sbin/nmbd" |
45 |
+nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}" |
46 |
+nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}" |
47 |
nmbd_reload="killall -HUP nmbd" |
48 |
|
49 |
samba4_start_options="" |
50 |
-samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}" |
51 |
-samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba" |
52 |
+samba4_command="/usr/sbin/samba" |
53 |
+samba4_pidfile="${piddir}/samba4.pid" |
54 |
+samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}" |
55 |
+samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}" |
56 |
samba4_reload="killall -HUP samba" |
57 |
|
58 |
winbind_start_options="" |
59 |
-winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}" |
60 |
-winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd" |
61 |
+winbind_command="/usr/sbin/winbindd" |
62 |
+winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}" |
63 |
+winbind_stop="start-stop-daemon --stop --exec ${winbind_command}" |
64 |
winbind_reload="killall -HUP winbindd" |
65 |
|
66 |
|
67 |
diff --git a/net-fs/samba/files/4.4/samba4.initd-r1 b/net-fs/samba/files/4.4/samba4.initd-r1 |
68 |
index 52a9b68bba8..05bd1fcfd69 100644 |
69 |
--- a/net-fs/samba/files/4.4/samba4.initd-r1 |
70 |
+++ b/net-fs/samba/files/4.4/samba4.initd-r1 |
71 |
@@ -1,9 +1,9 @@ |
72 |
#!/sbin/openrc-run |
73 |
-# Copyright 1999-2016 Gentoo Foundation |
74 |
+# Copyright 1999-2018 Gentoo Foundation |
75 |
# Distributed under the terms of the GNU General Public License, v2 or later |
76 |
|
77 |
extra_started_commands="reload" |
78 |
-piddir="/run/samba" |
79 |
+[ -z "${piddir}" ] && piddir="/run/samba" |
80 |
|
81 |
depend() { |
82 |
after slapd |