From c06a10e05fedcd49c4b2f88a435e9aad64395d0a Mon Sep 17 00:00:00 2001 From: romildo Date: Sun, 28 May 2017 15:21:57 -0300 Subject: [PATCH] locate: fix creation of the parent directory of of locate database --- nixos/modules/misc/locate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}