From c06a10e05fedcd49c4b2f88a435e9aad64395d0a Mon Sep 17 00:00:00 2001 From: romildo Date: Sun, 28 May 2017 15:21:57 -0300 Subject: locate: fix creation of the parent directory of of locate database --- nixos/modules/misc/locate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 6d9bc915ba03..654cce95ab23 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -131,7 +131,7 @@ 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}''} \ --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags} -- cgit 1.4.1 From 6ef6484dd645a7d1d6b1d3d993988ba5833a5701 Mon Sep 17 00:00:00 2001 From: romildo Date: Sun, 28 May 2017 15:22:46 -0300 Subject: locate: does not use localuser for mlocate --- nixos/modules/misc/locate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 654cce95ab23..0fe91435ce8c 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -133,7 +133,7 @@ in { '' 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 = { -- cgit 1.4.1