diff --git a/dhcp.changes b/dhcp.changes index aa0d199..f41809b 100644 --- a/dhcp.changes +++ b/dhcp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 17 16:19:58 UTC 2014 - mt@suse.com + +- Added support for custom for rcdhcpd[6] check-syntax,check-lease + and syntax-check actions (bnc#868713). + ------------------------------------------------------------------- Mon Feb 10 17:52:15 UTC 2014 - mt@suse.com diff --git a/dhcp.spec b/dhcp.spec index 72ff30b..4ba561e 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -405,6 +405,26 @@ ln -sf %{_sysconfdir}/init.d/dhcpd6 $RPM_BUILD_ROOT%{_sbindir}/rcdhcpd6 ln -sf %{_sysconfdir}/init.d/dhcrelay $RPM_BUILD_ROOT%{_sbindir}/rcdhcrelay ln -sf %{_sysconfdir}/init.d/dhcrelay6 $RPM_BUILD_ROOT%{_sbindir}/rcdhcrelay6 %endif +# rcservice actions +legacy_actionsdir=$RPM_BUILD_ROOT/usr/lib/initscripts/legacy-actions +cat >dhcpd.action <<'EOF' +#!/bin/bash +exec /usr/lib/dhcp/dhcpd -4 ${0##*/} +EOF +install -d -m0755 ${legacy_actionsdir}/dhcpd +install -m0755 dhcpd.action ${legacy_actionsdir}/dhcpd/syntax-check +ln -sf syntax-check ${legacy_actionsdir}/dhcpd/check-syntax +ln -sf syntax-check ${legacy_actionsdir}/dhcpd/check-lease +rm -f dhcpd.action +cat >dhcpd.action <<'EOF' +#!/bin/bash +exec /usr/lib/dhcp/dhcpd -6 ${0##*/} +EOF +install -d -m0755 ${legacy_actionsdir}/dhcpd6 +install -m0755 dhcpd.action ${legacy_actionsdir}/dhcpd6/syntax-check +ln -sf syntax-check ${legacy_actionsdir}/dhcpd6/check-syntax +ln -sf syntax-check ${legacy_actionsdir}/dhcpd6/check-lease +rm -f dhcpd.action # sysconfig files install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcpd \ $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/ @@ -577,6 +597,10 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi %if %{with systemd} %{_unitdir}/dhcpd.service %{_unitdir}/dhcpd6.service +%dir /usr/lib/initscripts/legacy-actions/dhcpd +/usr/lib/initscripts/legacy-actions/dhcpd/* +%dir /usr/lib/initscripts/legacy-actions/dhcpd6 +/usr/lib/initscripts/legacy-actions/dhcpd6/* %else %config %{_sysconfdir}/init.d/dhcpd %config %{_sysconfdir}/init.d/dhcpd6