glusterfs service: Copy hooks to /var at startup.

This is where glusterfs expects them; see also
https://github.com/gluster/glusterfs/blob/v3.10.1/extras/hook-scripts/Makefile.am#L4

Also see upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1452761

Changed files
+4 -1
nixos
modules
services
network-filesystems
+4 -1
nixos/modules/services/network-filesystems/glusterfs.nix
···
with lib;
let
-
inherit (pkgs) glusterfs;
+
inherit (pkgs) glusterfs rsync;
cfg = config.services.glusterfs;
···
after = [ "rpcbind.service" "network.target" "local-fs.target" ];
before = [ "network-online.target" ];
+
# The copying of hooks is due to upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1452761
preStart = ''
install -m 0755 -d /var/log/glusterfs
+
mkdir -p /var/lib/glusterd/hooks/
+
${rsync}/bin/rsync -a ${glusterfs}/var/lib/glusterd/hooks/ /var/lib/glusterd/hooks/
'';
serviceConfig = {