fanctl: fix state directory
This commit is contained in:
parent
648973d641
commit
7408ede358
1 changed files with 5 additions and 4 deletions
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in a new issue