From patchwork Tue Sep 3 12:44:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 1156968 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dySKX4kf"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KXGWC3EX"; 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 46N69h6k3Sz9sBF for ; Tue, 3 Sep 2019 22:45:12 +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-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ekn4Y/7/wXQDkViEVV2MtycU3504av7iPY9h6PemUzc=; b=dySKX4kf+JgCHi QpB6n/24HCY/1miOmWZBMD3jgoVV6S/g0Bld8jAJtcAYktgchHIPfjqW9GTmADGuvqUtQr4qVrAXV wfpNncZv7vZrUyoHbyBwFQkbPdWOQJ5SMBDFi6W2aQgoTezGFAGWP5Eubdvaxd84J7/IFwUJk3Jcp Jf+sRQvR4KUzh5NgDuqBjgtRK3Or5bNRG0UVPHK03yGurcpkhBDb6XFa1QAa8nYRm2002SfRK1PR+ XDnul8HMPWL3SY1ADi+zwqSdc7n+0+Qn+8vWbjCf39otCtaqycsgQdhGwqtvI0R6XiZLzrP/IhfjG L3p76ctaqtBuZQa6wQUQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i58B2-0005vX-8u; Tue, 03 Sep 2019 12:44:52 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i58Az-0005v9-DX for openwrt-devel@lists.openwrt.org; Tue, 03 Sep 2019 12:44:50 +0000 Received: by mail-lf1-x142.google.com with SMTP id w67so12765222lff.4 for ; Tue, 03 Sep 2019 05:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6whDCLbClohU+JVFPTPDNVHANtD2gb1aHpAtR5laffE=; b=KXGWC3EXrB39FakAjprODdV1Iyc/cpb6+0X69D6gYsJuD5LZcE5iBJi/GYKyCxeD5H P6AsnpzcD9Zb6c21isr2tgDLBrm2WjcA4YQZ5SlddY+oT4yoZfiiFBoCbsPvGpfc9C3t Dxqu0C5Aiy0KQP6KG2odUonTFyRR4O2tkmxq339vr4CT7NuqaaPPYywkcgs4to+oC3lO 9I4ruX1We0PG5AssQv/SZQYK5WVNURNlG5BCPAWqjiPLzwHSPS+hXfu7/SvXzaU55FIr Z210k0eFSF6pEB/r7LR5doAuts1+ASlNXiQl1QtCFdrF+Uy6TGL9U6T7Rq9sFRrHArMf +E2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6whDCLbClohU+JVFPTPDNVHANtD2gb1aHpAtR5laffE=; b=Ntrt8SrmFNQb6B4FBoDaQSXguqn4Kl0GxwFuMI4Bcifo/hxHCafOfQrAPhaKFDG9B1 1007AB4u1ZgDRRFWsCNTRQHBeBZpSMhrNqfqjNj1+qeb4qr513oZK/fyz+HTCgJJqlVb gpTu5fb5u7HjyPqqZ7mn8a9koiS64MCunJI7uFsna28oiLm33PKF499qUi2HNVlnOu5c xbqGA8YnH1QyztOZP8pN3c3eJSva4vbi+LddyykHyF9gy0GquU6hQMMJBrsQ8MjAmugb kJIpXTJbZqfP3ntMuQKG6DPSa+TZsDKbiEcwe6HRLS64RcLF2nEupObVCCOa12lRSLO2 8O9w== X-Gm-Message-State: APjAAAXqTW+0ODHGhzLe4MAXERqwDMx1fQHF9E3CpPYx3e1YUf5FPDA1 XtZ5PQfqDTkF7DCYwHTLHQYKgvcu X-Google-Smtp-Source: APXvYqyDYJXbPKkn3MFiwI8aYSWvjiKtDWHSEKqQ3cqWV/O6IA6LYYwqV1sznfTgNX3GrKxIgQD0DQ== X-Received: by 2002:a19:f819:: with SMTP id a25mr8582085lff.45.1567514687000; Tue, 03 Sep 2019 05:44:47 -0700 (PDT) Received: from localhost.localdomain (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id r16sm1197603lfi.77.2019.09.03.05.44.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Sep 2019 05:44:46 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: openwrt-devel@lists.openwrt.org Date: Tue, 3 Sep 2019 14:44:40 +0200 Message-Id: <20190903124440.11277-1-zajec5@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190903_054449_486246_84D788A2 X-CRM114-Status: UNSURE ( 8.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:142 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [PATCH] base-files: pass "force" parameter to the "sysupgrade" call 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: , Cc: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Jo-Philipp Wich , John Crispin Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Rafał Miłecki This makes sysupgrade work with the most recent procd that validates firmware before proceeding. Signed-off-by: Rafał Miłecki --- package/base-files/files/sbin/sysupgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 42f0f6bd22..f106c3c981 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -360,9 +360,12 @@ if [ -n "$FAILSAFE" ]; then printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade lock -u /tmp/.failsafe else + force_attr="" + [ $FORCE -eq 1 ] && force_attr="\"force\": true," ubus call system sysupgrade "{ \"prefix\": $(json_string "$RAM_ROOT"), \"path\": $(json_string "$IMAGE"), + $force_attr \"command\": $(json_string "$COMMAND"), \"options\": { \"save_config\": $SAVE_CONFIG,