avatar
mikhailnov has added 256557f7cc
dhcpd.leases(5) requires precreated databases
... ... --- a/dhcp.spec
... ... +++ b/dhcp.spec
... ... @@ -6,7 +6,7 @@
6 6
Name:		dhcp
7 7
Epoch:		3
8 8
Version:	%{major_version}%{patch_version}
9
Release:	5
9
Release:	6
10 10
Summary:	The ISC DHCP (Dynamic Host Configuration Protocol) server/relay agent/client
11 11
License:	Distributable
12 12
Group:		System/Servers
... ... @@ -291,6 +291,10 @@ EOF
291 291
# create this directory if it does not esist and then chmod it to allow dhcpd to work properly
292 292
[ ! -d %{var_dhcpd}/ ] && mkdir -p %{var_dhcpd}/
293 293
[ -d %{var_dhcpd} ] && chown -R isc-dhcpd:isc-dhcpd %{var_dhcpd}/
294
# https://forum.rosalinux.ru/viewtopic.php?f=56&t=9403
295
# dhcpd.leases(5) requires precreated databases
296
for i in dhcpd dhcpd6; do
297
[ ! -f %{var_dhcpd}/${i}.leases ] && touch %{var_dhcpd}/${i}.leases && chown isc-dhcpd:isc-dhcpd %{var_dhcpd}/${i}.leases; done
294 298
295 299
%preun server
296 300
%_preun_service dhcpd

Comments