Re: [RFC conntrackd PATCH] conntrackd: add basic systemd notification support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 October 2015 at 16:10, Jan Engelhardt <jengelh@xxxxxxx> wrote:
>
> On Friday 2015-10-16 14:10, Arturo Borrero Gonzalez wrote:
>
>>+AC_ARG_ENABLE([systemd],
>>+      AS_HELP_STRING([--disable-systemd], [Do not build systemd support]),
>>+      [enable_systemd="no"], [enable_systemd="yes"])
>
> This is incorrect. It needs to be
>
>         [enable_systemd="$enableval"], [enable_systemd="yes"])
>

I don't understand why. Could you please elaborate? The code above
(cthelper, cttimeout) is also bad?

I'm following this:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Package-Options.html

>
>>+++ b/src/systemd.c
>>@@ -0,0 +1,25 @@
>>+/*
>>+ * (C) 2015 by Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>
>>+ *
>>+ * This program is free software; you can redistribute it and/or modify
>>+ * it under the terms of the GNU General Public License as published by
>>+ * the Free Software Foundation; either version 2 of the License, or
>>+ * (at your option) any later version.
>>+ *
>>+ * This program is distributed in the hope that it will be useful,
>>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>+ * GNU General Public License for more details.
>>+ *
>>+ * You should have received a copy of the GNU General Public License
>>+ * along with this program; if not, write to the Free Software
>>+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>>+ */
>>+
>>+#include "systemd.h"
>>+#include <systemd/sd-daemon.h>
>>+
>>+void sd_ct_init(void)
>>+{
>>+      sd_notify(0, "READY=1");
>>+}
>
> It seems a bit excessive to create a new file just for this.
> (In particular since it means you had to use AM_CONDITIONAL
> to select the source file.)

Well, the idea (as stated in the patch description) is to add more
systemd-related features.
I'm thinking of:
 * tell systemd the state of the daemon in several circumstances
(start, stop, and so on)
 * tell systemd when the Unix socket is activated/deactivated
 * in the future, perhaps give support for systemd watchdog
 * other things... (PID, errno, etc...)

I guess a separate source file is OK for all the systemd-related stuff.

Sending READY=1 is just a basic starting feature. I don't want to
implement more things until it's clear we want systemd integration in
conntrackd.
-- 
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux