From 66078a41a96fa3d00d226e3aaf7ec17c2deda953 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Dec 2015 00:37:13 +0100 Subject: hook-scripts: fix S30Samba scripts on systemd systems /etc/init.d/smb does not exist on systemd systems. Using "service smb " is the portable way. It calls init scripts on sysv systems, and redirects to systemctl on systemd systems. > Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615 > BUG: 1290604 > Signed-off-by: Michael Adam > Reviewed-on: http://review.gluster.org/12945 > Tested-by: Gluster Build System > Reviewed-by: Anoop C S > Tested-by: NetBSD Build System > Reviewed-by: Niels de Vos (cherry picked from commit ce3ff7e328483dffdae6ae2914924bc2380db67e) Change-Id: Ied6b5fe330f8d29df10a9aea1809be5c5f0c8a5e BUG: 1292755 Signed-off-by: Michael Adam Reviewed-on: http://review.gluster.org/13000 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Rajesh Joseph --- extras/hook-scripts/set/post/S30samba-set.sh | 2 +- extras/hook-scripts/start/post/S30samba-start.sh | 2 +- extras/hook-scripts/stop/pre/S30samba-stop.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/hook-scripts/set/post/S30samba-set.sh b/extras/hook-scripts/set/post/S30samba-set.sh index e359059992b..97d067fc33f 100755 --- a/extras/hook-scripts/set/post/S30samba-set.sh +++ b/extras/hook-scripts/set/post/S30samba-set.sh @@ -99,7 +99,7 @@ function sighup_samba () { then kill -HUP "$pid"; else - /etc/init.d/smb condrestart + service smb condrestart fi } diff --git a/extras/hook-scripts/start/post/S30samba-start.sh b/extras/hook-scripts/start/post/S30samba-start.sh index 43dc8e108da..752eca650d3 100755 --- a/extras/hook-scripts/start/post/S30samba-start.sh +++ b/extras/hook-scripts/start/post/S30samba-start.sh @@ -82,7 +82,7 @@ function sighup_samba () { then kill -HUP "$pid"; else - /etc/init.d/smb condrestart + service smb condrestart fi } diff --git a/extras/hook-scripts/stop/pre/S30samba-stop.sh b/extras/hook-scripts/stop/pre/S30samba-stop.sh index 8950eea436e..62cf7d1e0d2 100755 --- a/extras/hook-scripts/stop/pre/S30samba-stop.sh +++ b/extras/hook-scripts/stop/pre/S30samba-stop.sh @@ -61,7 +61,7 @@ function sighup_samba () { then kill -HUP $pid; else - /etc/init.d/smb condrestart + service smb condrestart fi } -- cgit