From 7408ede358ba79c011db35e03abce0759e643ddf Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Sat, 22 Aug 2015 14:08:29 -0400 Subject: [PATCH] fanctl: fix state directory --- pkgs/os-specific/linux/fanctl/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/fanctl/default.nix b/pkgs/os-specific/linux/fanctl/default.nix index 1d6e5e744cdf..61e100f4c9b7 100644 --- a/pkgs/os-specific/linux/fanctl/default.nix +++ b/pkgs/os-specific/linux/fanctl/default.nix @@ -1,6 +1,7 @@ { stdenv, lib, fetchbzr, makeWrapper, bridge-utils, iproute, dnsmasq, iptables, kmod, utillinux }: -stdenv.mkDerivation rec { +let stateDir = "/var/lib/fan-networking"; +in stdenv.mkDerivation rec { name = "fanctl-${version}"; version = "0.3.0"; @@ -17,16 +18,16 @@ stdenv.mkDerivation rec { # if that files does not exist, dnsmasq subsequently fails, # so we'll use /dev/null. # - # Also, make sure /var/lib/fan-networking exists before starting dnsmasq. + # Also, make sure the state directory before starting dnsmasq. buildPhase = '' substituteInPlace fanctl \ --replace '--conf-file= ' \ '--conf-file=/dev/null ' \ --replace '/var/lib/misc' \ - '/var/lib/ubuntu-fan' + '${stateDir}' sed -i '/dnsmasq -u/i \ - mkdir -p /var/lib/fan-networking' fanctl + mkdir -p ${stateDir}' fanctl ''; installPhase = ''