1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Make systemctl reference indirect in packaging/NetworkManager/30-winbind-systemd

Some distributions have clever dependency generators when building packages
and generate dependencies for each executable called out in shell scripts.
The end result is that a package built out of samba would contain explicit dependency
to systemd even though it is usable without systemd.

Making systemctl reference indirect avoids explicit dependency.

Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Feb 22 18:18:20 CET 2013 on sn-devel-104
This commit is contained in:
Alexander Bokovoy 2013-02-22 12:07:19 +02:00
parent 92b087182c
commit 36da56ec51

View File

@ -1,6 +1,6 @@
#!/bin/sh
winbind_is_active=$(/bin/systemctl is-active winbind.service)
SYSTEMCTL=/bin/systemctl
winbind_is_active=$($SYSTEMCTL is-active winbind.service)
test "${winbind_is_active}" = "active" || exit 0
winbind_offline_logon=$(testparm -s --parameter-name "winbind offline logon" 2>/dev/null)
@ -8,9 +8,9 @@ test "${winbind_offline_logon}" = "Yes" || exit 0
case "$2" in
up|vpn-up)
nmb_is_active=$(/bin/systemctl is-active nmb.service)
nmb_is_active=$($SYSTEMCTL is-active nmb.service)
if test "${nmb_is_active}" = "active"; then
/bin/systemctl try-restart nmb.service || :
$SYSTEMCTL try-restart nmb.service || :
fi
/usr/bin/smbcontrol winbind online || :
;;