1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/packaging/systemd
Oleksandr Natalenko a3d248f284 systemd: Only start smb when network interfaces are up
For smb, if the smb.conf contains explicit bindings to the network
interfaces, the service must wait till network interfaces are up,
otherwise the service won't be operational.

The 0e571054a6 commit and the BZ 13184 have fixed this for nmb and
samba, so do exactly the same here, for smb.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13559

Signed-off-by: Oleksandr Natalenko <oleksandr@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Aug  3 17:28:52 CEST 2018 on sn-devel-144
2018-08-03 17:28:52 +02:00
..
nmb.service.in systemd: Fix kill path 2018-01-14 17:38:26 +01:00
README packaging: Add config for systemd-tmpfiles. 2012-10-09 17:10:53 +02:00
samba.conf.tmp packaging: Add config for systemd-tmpfiles. 2012-10-09 17:10:53 +02:00
samba.service.in systemd: Fix kill path 2018-01-14 17:38:26 +01:00
samba.sysconfig systemd: Add samba service file. 2012-04-04 18:04:09 +02:00
smb.service.in systemd: Only start smb when network interfaces are up 2018-08-03 17:28:52 +02:00
winbind.service.in systemd: Fix kill path 2018-01-14 17:38:26 +01:00

With systemd the /run or /var/run are tmpfs filesystems. This means
the direcories required by samba need to be created during startup.
This can be done with a config file for tmpfiles, see samba.conf.tmp.
You need to copy this file to the directoy systemd-tmpfiles is looking
for its config files e.g.:

install -d -m 0755 /etc/tmpfiles.d/
install -m644 samba.conf.tmp /etc/tmpfiles.d/samba.conf

If you're a packager don't forget to run the systemd-tmpfiles binary
in the script after samba has been installed. This makes sure the
directory exists and you can start samba directly after the installation.

/usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/samba.conf