Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 875903 Details for
Bug 1077666
Make dhcpd.service Type=notify
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Add support for sending startup notification from dhcpd to systemd
0001-dhcpd-make-dhcpd-service-of-Type-notify.patch (text/plain), 4.32 KB, created by
Michal Sekletar
on 2014-03-18 11:41:37 UTC
(
hide
)
Description:
Add support for sending startup notification from dhcpd to systemd
Filename:
MIME Type:
Creator:
Michal Sekletar
Created:
2014-03-18 11:41:37 UTC
Size:
4.32 KB
patch
obsolete
>From c2a8a8a58d17b85c5d5dc343dc733140f401972e Mon Sep 17 00:00:00 2001 >From: Michal Sekletar <msekleta@redhat.com> >Date: Tue, 18 Mar 2014 12:36:58 +0100 >Subject: [PATCH] dhcpd: make dhcpd service of Type=notify > >--- > dhcp-4.2.5-sd-daemon.patch | 51 ++++++++++++++++++++++++++++++++++++++++++++++ > dhcp.spec | 13 ++++++++++-- > dhcpd.service | 1 + > 3 files changed, 63 insertions(+), 2 deletions(-) > create mode 100644 dhcp-4.2.5-sd-daemon.patch > >diff --git a/dhcp-4.2.5-sd-daemon.patch b/dhcp-4.2.5-sd-daemon.patch >new file mode 100644 >index 0000000..be62849 >--- /dev/null >+++ b/dhcp-4.2.5-sd-daemon.patch >@@ -0,0 +1,51 @@ >+diff -up dhcp-4.2.5/configure.ac.sd-daemon dhcp-4.2.5/configure.ac >+--- dhcp-4.2.5/configure.ac.sd-daemon 2014-03-18 12:01:28.156567089 +0100 >++++ dhcp-4.2.5/configure.ac 2014-03-18 12:06:07.539200067 +0100 >+@@ -714,6 +714,17 @@ if test x$ldap = xyes || test x$ldapcryp >+ fi >+ fi >+ >++AC_ARG_WITH(systemd, >++ AC_HELP_STRING([--with-systemd], >++ [enable sending status notifications to systemd daemon (default is no)]), >++ [systemd=$withval], >++ [systemd=no]) >++ >++if test x$systemd = xyes ; then >++ AC_CHECK_LIB(systemd-daemon, sd_notify, , >++ AC_MSG_FAILURE([*** sd-daemon library not present - do you need to install systemd-libs package?])) >++fi >++ >+ # Append selected warning levels to CFLAGS before substitution (but after >+ # AC_TRY_COMPILE & etc). >+ CFLAGS="$CFLAGS $STD_CWARNINGS" >+diff -up dhcp-4.2.5/server/dhcpd.c.sd-daemon dhcp-4.2.5/server/dhcpd.c >+--- dhcp-4.2.5/server/dhcpd.c.sd-daemon 2014-03-18 12:01:28.142567052 +0100 >++++ dhcp-4.2.5/server/dhcpd.c 2014-03-18 12:04:51.483044317 +0100 >+@@ -60,6 +60,10 @@ static const char url [] = >+ >+ #include "trace.h" >+ >++#ifdef HAVE_LIBSYSTEMD_DAEMON >++#include <systemd/sd-daemon.h> >++#endif >++ >+ #ifndef UNIT_TEST >+ static void usage(void); >+ #endif >+@@ -869,6 +873,15 @@ main(int argc, char **argv) { >+ (omapi_object_t *)0, "state", server_running); >+ >+ TRACE(DHCPD_MAIN()); >++ >++#ifdef HAVE_LIBSYSTEMD_DAEMON >++ /* We are ready to process incomming packets. Let's notify systemd */ >++ sd_notifyf(0, "READY=1\n" >++ "STATUS=Dispatching packets...\n" >++ "MAINPID=%lu", >++ (unsigned long) getpid()); >++#endif >++ >+ /* Receive packets and dispatch them... */ >+ dispatch (); >+ >diff --git a/dhcp.spec b/dhcp.spec >index b858e34..3ebe86f 100644 >--- a/dhcp.spec >+++ b/dhcp.spec >@@ -18,7 +18,7 @@ > Summary: Dynamic host configuration protocol software > Name: dhcp > Version: 4.2.5 >-Release: 27%{?dist} >+Release: 28%{?dist} > # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to > # dcantrell maintaining the package) made incorrect use of the epoch and > # that's why it is at 12 now. It should have never been used, but it was. >@@ -81,6 +81,7 @@ Patch47: dhcp-4.2.5-range6.patch > Patch48: dhcp-4.2.5-next-server.patch > Patch49: dhcp-4.2.5-ipv6-bind-to-interface.patch > Patch50: dhcp-ffff-checksum.patch >+Patch51: dhcp-4.2.5-sd-daemon.patch > > BuildRequires: autoconf > BuildRequires: automake >@@ -352,6 +353,9 @@ rm -rf includes/isc-dhcp > # (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #25587]) > %patch50 -p1 -b .ffff > >+# dhcpd: add support for sending startup notification to systemd >+%patch51 -p1 -b .sd-daemon >+ > # Update paths in all man pages > for page in client/dhclient.conf.5 client/dhclient.leases.5 \ > client/dhclient-script.8 client/dhclient.8 ; do >@@ -394,7 +398,9 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \ > %if 0%{?fedora} > --with-atf \ > %endif >- --enable-paranoia --enable-early-chroot >+ --enable-paranoia --enable-early-chroot \ >+ --with-systemd >+ > %{__make} %{?_smp_mflags} > > %if 0%{?fedora} >@@ -619,6 +625,9 @@ done > > > %changelog >+* Tue Mar 18 2014 Michal Sekletar <msekleta@redhat.com> - 12:4.2.5-28 >+- add support for sending startup notifications from dhcpd to systemd >+ > * Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 12:4.2.5-27 > - Mass rebuild 2014-01-24 > >diff --git a/dhcpd.service b/dhcpd.service >index 13269b7..746011b 100644 >--- a/dhcpd.service >+++ b/dhcpd.service >@@ -5,6 +5,7 @@ After=network.target > After=time-sync.target > > [Service] >+Type=notify > ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid > > [Install] >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jpopelka
: review+
Actions:
View
|
Diff
Attachments on
bug 1077666
: 875903