autofs service: make service more like upstream one
This commit is contained in:
parent
3e84cbc4ca
commit
4a35d08970
@ -75,9 +75,10 @@ in
|
|||||||
boot.kernelModules = [ "autofs4" ];
|
boot.kernelModules = [ "autofs4" ];
|
||||||
|
|
||||||
systemd.services.autofs =
|
systemd.services.autofs =
|
||||||
{ description = "Filesystem automounter";
|
{ description = "Automounts filesystems on demand";
|
||||||
|
after = [ "network.target" "ypbind.service" "sssd.service" "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
# There should be only one autofs service managed by systemd, so this should be safe.
|
# There should be only one autofs service managed by systemd, so this should be safe.
|
||||||
@ -85,7 +86,9 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.autofs5}/sbin/automount ${if cfg.debug then "-d" else ""} -f -t ${builtins.toString cfg.timeout} ${autoMaster} ${if cfg.debug then "-l7" else ""}";
|
Type = "forking";
|
||||||
|
PIDFile = "/run/autofs.pid";
|
||||||
|
ExecStart = "${pkgs.autofs5}/bin/automount ${optionalString cfg.debug "-d"} -p /run/autofs.pid -t ${builtins.toString cfg.timeout} ${autoMaster}";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user