From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id 77FD96AC4C for ; Tue, 24 Nov 2015 06:06:55 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id tAO66qPp013139 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 23 Nov 2015 22:06:52 -0800 (PST) Received: from [128.224.163.138] (128.224.163.138) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 Nov 2015 22:06:51 -0800 Message-ID: <5653FE7A.7080600@windriver.com> Date: Tue, 24 Nov 2015 14:06:50 +0800 From: ChenQi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Rongqing Li , References: <0f73a35f4fdbd74e380aa823d436a67f841b9d76.1448342223.git.Qi.Chen@windriver.com> <5653F60D.4040009@windriver.com> In-Reply-To: <5653F60D.4040009@windriver.com> X-Originating-IP: [128.224.163.138] Subject: Re: [PATCH 1/1] dhcp: enable gentle shutdown X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 06:06:56 -0000 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit On 11/24/2015 01:30 PM, Rongqing Li wrote: > > > On 2015年11月24日 13:21, Chen Qi wrote: >> For now, `systemctl stop dhcpd' cannot stop dhcpd correctly, the SIGTERM >> signal would time out, causing a SIGKILL signal sent to dhcpd. >> >> Patch site.h to enable gentle shutdown to so that dhcpd could be stopped >> by SIGTERM. >> >> Signed-off-by: Chen Qi >> --- >> .../dhcp/0001-site.h-enable-gentle-shutdown.patch | 25 >> ++++++++++++++++++++++ >> meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb | 1 + >> 2 files changed, 26 insertions(+) >> create mode 100644 >> meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch >> >> diff --git >> a/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch >> b/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch >> >> new file mode 100644 >> index 0000000..4344212 >> --- /dev/null >> +++ >> b/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch >> @@ -0,0 +1,25 @@ >> +Upstream-Status: Inappropriate [configuration] >> + >> +Subject: [PATCH] site.h: enable gentle shutdown >> + >> +Signed-off-by: Chen Qi >> +--- >> + includes/site.h | 2 +- >> + 1 file changed, 1 insertion(+), 1 deletion(-) >> + >> +diff --git a/includes/site.h b/includes/site.h >> +index 73fa4e8..9c33de3 100644 >> +--- a/includes/site.h >> ++++ b/includes/site.h >> +@@ -280,7 +280,7 @@ >> + situations. We plan to revisit this feature and may >> + make non-backwards compatible changes including the >> + removal of this define. Use at your own risk. */ >> +-/* #define ENABLE_GENTLE_SHUTDOWN */ >> ++#define ENABLE_GENTLE_SHUTDOWN > > how about to pass the macro in TARGET_CFLAGS > > TARGET_CFLAGS += "-DENABLE_GENTLE_SHUTDOWN" > > > -Roy > site.h file starts with the following statements: """ /* Site-specific definitions. For supported systems, you shouldn't need to make any changes here. However, you may want to, in order to deal with site-specific differences. */ """ And there's already a patch in dhcp to modify site.h for our specific configuration. define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch So I think we need to keep the configuration in site.h. Regards, Chen Qi >> + >> + /* Include old error codes. This is provided in case you >> + are building an external program similar to omshell for >> +-- >> +1.9.1 >> + >> diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb >> b/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb >> index b4a05fc..60ca4e3 100644 >> --- a/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb >> +++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb >> @@ -6,6 +6,7 @@ SRC_URI += >> "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \ >> file://fixsepbuild.patch \ >> file://dhclient-script-drop-resolv.conf.dhclient.patch \ >> file://replace-ifconfig-route.patch \ >> + file://0001-site.h-enable-gentle-shutdown.patch \ >> " >> >> SRC_URI[md5sum] = "5a284875dd2c12ddd388416d69156a67" >> >