From patchwork Sat May 30 01:32:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Bailey X-Patchwork-Id: 1301100 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=meshplusplus.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=UD6ekA1J; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=meshplusplus-com.20150623.gappssmtp.com header.i=@meshplusplus-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=VjITYVj+; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49YkTk641Bz9sPK for ; Sat, 30 May 2020 11:33:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:To:Message-ID:Date:From:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=i+uXmW78BOPUz3GDtLfvkwcRUFXLC7GbX4kU/OoXZLY=; b=UD6 ekA1JNG5/iGbF+TRPWQ5nmapcqjddC4uFjOO6IMS7SuisLPJhhIAwHYEnZEMAj4Jjfwez0YocenjB bAti67Zd+Xl0cRI2sqcRn3ihFE1Nz3ifh+m5Zp1wQ97fSLFr2hZOc7F7HtkR5WXMtSj4ZcRR1ogBT xxjrJ/vqgXgUSpzn7lYYRsFCTVzrzHU573gzcvLaNGThSd+Vvzwkpam89inb5fx8sOu74QjQoP6Cu 3yOukrdKjbfNbkY9TcxN1CmoYLWtuDXo+3i9cVmUOb8nTuizoOxlHAzN652ts/667MsANvRk0y32R ylrrboj5dAxu0BXYEW9c07rQ+CTrIjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeqN4-0004Nr-UO; Sat, 30 May 2020 01:33:10 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeqN1-0004Mc-Si for openwrt-devel@lists.openwrt.org; Sat, 30 May 2020 01:33:09 +0000 Received: by mail-il1-x12a.google.com with SMTP id j3so4272003ilk.11 for ; Fri, 29 May 2020 18:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meshplusplus-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=rSS9526Ut0gV7yFFtuYIRgMfHoGkGb0N3cE0otMelZo=; b=VjITYVj+kCxH+My7HPLbtLCW3bVozcRasRJI20nUOrccvDVPNeaLZFGxTJVFuZe7Cb 04Vb5DqsmFTh1P9j6L9PrTBHswZcc2FLJnNwzqlqVZnPG/roccI2GEC+g6fEHj+3FbqE JmX9jOtXUIdSNUETLwW/2dm06zyU8yp7S3vknXW/zYEO6m9ZdI7wIBxQMt0h7KR5yHoW cKE5NxFxabov1JMBiWaj40ovJuU1kqePneg3nqZsAlWzJaps/G+vHpqAwr+AW/tt5IN+ y9KPcWMNmjhZxEZJm5CKKz7jqdudlwViGUhvxvd0qYVNq/ViUmv6cHMzCRyQPudoWPdr GWRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rSS9526Ut0gV7yFFtuYIRgMfHoGkGb0N3cE0otMelZo=; b=X4txjJV93BnhjP+VbsclRrKUxpurjtZpAcCFIzuDh5SdzyuZvEyySLYoVmTkTznvLP Ub6mFKsUID7o9J/o2so4lF3J1sfmrOZaGM4SCUxNAf2ylGL7lOWv+Q9zU9isIHvsR9Nk bNDrH9xd3IxE4Dkyiuqo6mRdeMHRDo6S3ShE0eOTAoqThTDIL2qFizEw4dg8hPX15L57 nd7tx6BTVWOSwzTBITq9Sl6WDRlLfTp1cqbSCQQJwmn+qrmVm3BSIEYv3/rSgSQIlOrH cS/qpU03KXEnJE3UU1aABv4lWna7pl2Xi7xv856SF90wadzMvRnQofdEW1WgYcWOVLC4 UsXA== X-Gm-Message-State: AOAM5338HG9lcXr720WNO8bF+Db8lvYJSjnt0WYhPDj6K3UphSyl7sSS 5C+V4zuPfLLscqFOkNHoYmH2l9fICjz3mpK6ovrBcbNEhzE= X-Google-Smtp-Source: ABdhPJxVXJN14qYp9mgBQl55FzTd5vFIykWgrwwj2ii9OYYR7JaQ3/SWsgGdsEq1cYUtbBtXH6P3KDMk8fvXmq5riTI= X-Received: by 2002:a92:5e4a:: with SMTP id s71mr9104845ilb.119.1590802384714; Fri, 29 May 2020 18:33:04 -0700 (PDT) MIME-Version: 1.0 From: Daniel Bailey Date: Fri, 29 May 2020 18:32:53 -0700 Message-ID: To: openwrt-devel@lists.openwrt.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200529_183308_001613_6DDE8E8B X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:12a listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [PATCH 2/2] procd: allow optional watchdog instance parameter X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Daniel Bailey Date: Thu, 28 May 2020 20:39:35 -0700 Subject: [PATCH] procd: allow optional watchdog instance parameter Optional instance watchdog timeout and watchdog mode be set by adding procd_set_param $mode $timeout $mode is an integer [0-2] representing instance watchdog mode of operation: 0 = disabled 1 = passive mode, e.g. client must poke watchdog via ubus 2 = active mode, e.g. client must provide watchdog endpoint Signed-off-by: Daniel Bailey --- package/system/procd/files/procd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index dd6dc1c58d..3a1f413f85 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -186,7 +186,7 @@ _procd_add_jail() { json_add_string name "$1" shift - + for a in $@; do case $a in log) json_add_boolean "log" "1";; @@ -247,7 +247,7 @@ _procd_set_param() { env|data|limits) _procd_add_table "$type" "$@" ;; - command|netdev|file|respawn|watch) + command|netdev|file|respawn|watch|watchdog) _procd_add_array "$type" "$@" ;; error) @@ -378,7 +378,7 @@ _procd_append_param() { env|data|limits) _procd_add_table_data "$@" ;; - command|netdev|file|respawn|watch) + command|netdev|file|respawn|watch|watchdog) _procd_add_array_data "$@" ;; error)