mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
Make sure DNSMASQ_STATE_DIR exists
otherwise the directory returned by networkDnsmasqLeaseFileName will not be created if ipdef->nhosts == 0 in networkBuildDnsmasqArgv.
This commit is contained in:
parent
bf130d2c85
commit
bf5e3f6598
@ -662,6 +662,13 @@ networkStartDhcpDaemon(virNetworkObjPtr network)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((err = virFileMakePath(DNSMASQ_STATE_DIR)) != 0) {
|
||||||
|
virReportSystemError(err,
|
||||||
|
_("cannot create directory %s"),
|
||||||
|
DNSMASQ_STATE_DIR);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
cmd = virCommandNew(DNSMASQ);
|
cmd = virCommandNew(DNSMASQ);
|
||||||
if (networkBuildDnsmasqArgv(network, ipdef, pidfile, cmd) < 0) {
|
if (networkBuildDnsmasqArgv(network, ipdef, pidfile, cmd) < 0) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user