From 22669e2a71987a74b588ab02edf7a3a909b645f2 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Mon, 11 Jun 2018 12:21:39 +0200 Subject: net-fs/samba: Init script improvements. Bug: https://bugs.gentoo.org/652896 Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- net-fs/samba/files/4.4/samba4.confd | 23 +++++++++++++++-------- net-fs/samba/files/4.4/samba4.initd-r1 | 4 ++-- 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'net-fs') diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd index 58b2c7827bdf..2604981f2141 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: _ #---------------------------------------------------------------------------- @@ -17,22 +19,27 @@ my_service_POST="" # Daemons calls: _ #---------------------------------------------------------------------------- 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 52a9b68bba80..05bd1fcfd695 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 -- cgit v1.2.3