From patchwork Tue Jun 12 23:37:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 928535 X-Patchwork-Delegate: blogic@openwrt.org 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=none (p=none dis=none) header.from=david-bauer.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D/N8NhHm"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4155tR1psMz9s1B for ; Wed, 13 Jun 2018 09:38:39 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:Date:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hrAOimn9UcOGAXNOScYS2ULEAtHQ8UPCqaSCUpPzcLw=; b=D/N8NhHmGWSYCB 1CNRwbhTuU6AQQNYs0/Fzrz0iyHYtzkXcmoAzXcbgksaUGxeJhGFTbO49AT3MFbXg8YeViSTJu+qE uknoEylz+jz5GqWLM8oiM+LNuekVrPRFWGiWR58OZJJ1kFojcd8UlspQxBD61MN7Ds4kZpY+4MknQ 0rZ/q4G5sIroa4dv5AqOrIxXoF4rw9ZOpUTOn7mI5qw9OdOWXI6CfBhcaexGPgQ55H7DphDr5T6zZ 39+IOLduSdOZL1Ktw/7EWzJMW9UcBym+MmaL3B3uCPfN9dOGS7ze6X5BieRYkLIqbmL34vq7pXtAh VlBHPqF/m7WjVd4K4L9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSsrn-00045O-Hi; Tue, 12 Jun 2018 23:38:23 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSsri-0003f0-1h for openwrt-devel@lists.openwrt.org; Tue, 12 Jun 2018 23:38:20 +0000 Received: from localhost.localdomain (p20030071CF0F920049E80073C4EEA46A.dip0.t-ipconnect.de [IPv6:2003:71:cf0f:9200:49e8:73:c4ee:a46a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id C82471FB44 for ; Wed, 13 Jun 2018 01:38:02 +0200 (CEST) From: David Bauer To: openwrt-devel@lists.openwrt.org Date: Wed, 13 Jun 2018 01:37:55 +0200 Message-Id: <20180612233755.22690-1-mail@david-bauer.net> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180612_163818_239353_C9AC79F6 X-CRM114-Status: UNSURE ( 8.28 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [PATCH] ipq40xx: add get_status_led to diag.sh X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This commit adds the get_status_led method to diag.sh, which sets the boot-led as status-led for scripts using this method to get a status-led. This method is used platform-independent in downstream project gluon to set the LED used to indicate the config-mode. Signed-off-by: David Bauer --- target/linux/ipq40xx/base-files/etc/diag.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/linux/ipq40xx/base-files/etc/diag.sh b/target/linux/ipq40xx/base-files/etc/diag.sh index 4cfe6325f2..a3a7047702 100755 --- a/target/linux/ipq40xx/base-files/etc/diag.sh +++ b/target/linux/ipq40xx/base-files/etc/diag.sh @@ -7,6 +7,10 @@ failsafe="$(get_dt_led failsafe)" running="$(get_dt_led running)" upgrade="$(get_dt_led upgrade)" +get_status_led() { + status_led="$boot" +} + set_state() { status_led="$boot"