git.iko.soy/typeable/nixpkgs
on master help sign in
unbound service: do not initialize root cert

When enableRootTrustAnchor is set to false, there is really no point in initializing the root key before starting unbound. Fixes #15605.

commitbf0e745597c5fc9547e41905f0f0354d009f154e authorArnold Krille <arnold@arnoldarts.de> dateSat 21 May 2016, 13:12 (11 years ago) parentd565687
1 file changed+2
nixos/modules/services/networking/unbound.nix+2
nixos/modules/services/networking/unbound.nix+2
@@ -106,8 +106,10 @@ in
106106 preStart = ''
107107 mkdir -m 0755 -p ${stateDir}/dev/
108108 cp ${confFile} ${stateDir}/unbound.conf
109+ ${optionalString cfg.enableRootTrustAnchor ''
109110 ${pkgs.unbound}/bin/unbound-anchor -a ${rootTrustAnchorFile}
110111 chown unbound ${stateDir} ${rootTrustAnchorFile}
112+ ''}
111113 touch ${stateDir}/dev/random
112114 ${pkgs.utillinux}/bin/mount --bind -n /dev/random ${stateDir}/dev/random
113115 '';