fanctl: fix state directory
This commit is contained in:
parent
648973d641
commit
7408ede358
@ -1,6 +1,7 @@
|
|||||||
{ stdenv, lib, fetchbzr, makeWrapper, bridge-utils, iproute, dnsmasq, iptables, kmod, utillinux }:
|
{ 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}";
|
name = "fanctl-${version}";
|
||||||
|
|
||||||
version = "0.3.0";
|
version = "0.3.0";
|
||||||
@ -17,16 +18,16 @@ stdenv.mkDerivation rec {
|
|||||||
# if that files does not exist, dnsmasq subsequently fails,
|
# if that files does not exist, dnsmasq subsequently fails,
|
||||||
# so we'll use /dev/null.
|
# 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 = ''
|
buildPhase = ''
|
||||||
substituteInPlace fanctl \
|
substituteInPlace fanctl \
|
||||||
--replace '--conf-file= ' \
|
--replace '--conf-file= ' \
|
||||||
'--conf-file=/dev/null ' \
|
'--conf-file=/dev/null ' \
|
||||||
--replace '/var/lib/misc' \
|
--replace '/var/lib/misc' \
|
||||||
'/var/lib/ubuntu-fan'
|
'${stateDir}'
|
||||||
|
|
||||||
sed -i '/dnsmasq -u/i \
|
sed -i '/dnsmasq -u/i \
|
||||||
mkdir -p /var/lib/fan-networking' fanctl
|
mkdir -p ${stateDir}' fanctl
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user