From patchwork Tue Sep 1 12:14:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 512798 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 79D2214056B for ; Tue, 1 Sep 2015 22:20:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=O2F5Odi4; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 494E728C611; Tue, 1 Sep 2015 14:17:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id AC0BD28BFE9 for ; Tue, 1 Sep 2015 14:17:40 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 1 Sep 2015 14:17:40 +0200 (CEST) Received: by paczk9 with SMTP id zk9so27607731pac.0 for ; Tue, 01 Sep 2015 05:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BudxZGxFrigbs+n16uB9x+OtmeQoKXTTw4B4jPoFPlo=; b=O2F5Odi43/O85XRXoxnm3eZspSDZGIAMtGiz7gu+0tclBHCufupZCw6TWV1zbdwL6a l296PYJQ+M+BHUs7jmb2O+L0wttgbcQc2ASTFfp3zmDh0F9XXgOnVLxh7kFtdDMWHlEq buCXDTuy+X+yivo9ftoaLSTUiNlS0RHkt5gaOEjqtac2Adhm+U6Eb2nfHHutviuZ18az F4cLVmEd4c3zGQHZBUC6SZtwDfVG5RUXgSnFhN/5TNDcNFFJYDcthb9kXlokN7Ep8nmQ x10oLy/HV2OHpdolE+Rk/Ayiz4N3rCnkFGuUemkHNKsC08qGkIMhIWGqwrkQk0PH8eRO tNSw== X-Received: by 10.69.2.227 with SMTP id br3mr46545385pbd.9.1441109917084; Tue, 01 Sep 2015 05:18:37 -0700 (PDT) Received: from debian.corp.sankuai.com ([103.29.140.57]) by smtp.gmail.com with ESMTPSA id qc2sm17967378pbc.79.2015.09.01.05.18.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 05:18:36 -0700 (PDT) From: Yousong Zhou To: openwrt-devel@lists.openwrt.org Date: Tue, 1 Sep 2015 20:14:43 +0800 Message-Id: <1441109686-27796-3-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441109686-27796-1-git-send-email-yszhou4tech@gmail.com> References: <1441109686-27796-1-git-send-email-yszhou4tech@gmail.com> Subject: [OpenWrt-Devel] [PATCH 3/6] base-files: set kernel.core_pattern in sysctl.conf X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Move the pattern setting from netifd's service script to /etc/sysctl.conf. Put the timestamp component '%t' just after executable name '%e' for more natural order from output of ls command. Signed-off-by: Yousong Zhou --- package/base-files/files/etc/sysctl.conf | 2 ++ package/network/config/netifd/files/etc/init.d/network | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf index 8f3de1a..2ea1f1a 100644 --- a/package/base-files/files/etc/sysctl.conf +++ b/package/base-files/files/etc/sysctl.conf @@ -1,4 +1,6 @@ kernel.panic=3 +kernel.core.pattern=/tmp/%e.%t.%p.%s.core + net.ipv4.conf.default.arp_ignore=1 net.ipv4.conf.all.arp_ignore=1 net.ipv4.ip_forward=1 diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network index 542fc08..bdadbbc 100755 --- a/package/network/config/netifd/files/etc/init.d/network +++ b/package/network/config/netifd/files/etc/init.d/network @@ -21,7 +21,6 @@ start_service() { procd_set_param watch network.interface [ -e /proc/sys/kernel/core_pattern ] && { procd_set_param limits core="unlimited" - echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern } procd_close_instance }