diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2017-06-10 11:56:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-10 11:56:26 +0100 |
commit | 9c0577447cdb9da5648620a1283a80569cff08c8 (patch) | |
tree | 149692f76a0f61a81872e0896afae91f15325dbe /nixos | |
parent | e6f6885da2ec4d110dfc98296c249e5dbe211a11 (diff) | |
parent | 6ef6484dd645a7d1d6b1d3d993988ba5833a5701 (diff) |
Merge pull request #26191 from romildo/fix.mlocate
locate: fix creation of parent dir of database
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/misc/locate.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 6d9bc915ba030..0fe91435ce8cb 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -131,9 +131,9 @@ in { path = mkIf (!isMLocate) [ pkgs.su ]; script = '' - install -m ${if isMLocate then "0750" else "0755"} -o root -g ${if isMLocate then "mlocate" else "root"} -d $(dirname ${cfg.output}) + mkdir -m 0755 -p ${dirOf cfg.output} exec ${cfg.locate}/bin/updatedb \ - ${optionalString (cfg.localuser != null) ''--localuser=${cfg.localuser}''} \ + ${optionalString (cfg.localuser != null && ! isMLocate) ''--localuser=${cfg.localuser}''} \ --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags} ''; environment = { |