Message ID | 20230619113106.2653595-5-linus.walleij@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=27CycC4j; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=v8QSih6B; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql7184b0Rz20XQ for <incoming@patchwork.ozlabs.org>; Mon, 19 Jun 2023 21:32:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TfP2HAGNdVhDqJwg5NYEcWY3+5iuHFYFg6NHNxVkujs=; b=27CycC4jCBgOl1 4fF+UYCPNr5EujHHlcyWh9lQU5NmrieHZ0YGPYsO+k5r8QymZzzA6WP3fDLDxOpa4j6iGTm2wEroF JTGTUgG8fFjlWCMCzDPktSLP5c8LTCB2uGyLRTBWFypPiTj2qwLtzh0tK8JC7KoxKJsPZtwr5gZV/ GhsAAeK5MmIilyga2PhaN1Vc//rRl/OeJmX6AyzBs57WbDt99U5qAkvE3R+144yhCopV+ZARNhnaK jTPJdMPLxhUbyQnZ1kEmympDR7/0fiPdv+2vRsifp9lmULtaAmlADEqNU5hDsXqv0P3ptJmdTXMm/ OYw4+K4UJDYX0dqRNAgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBD6e-008MR9-0n; Mon, 19 Jun 2023 11:31:36 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBD6Z-008MOX-2A for openwrt-devel@lists.openwrt.org; Mon, 19 Jun 2023 11:31:33 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f849605df4so4219049e87.3 for <openwrt-devel@lists.openwrt.org>; Mon, 19 Jun 2023 04:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687174289; x=1689766289; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k1y9rG4Qmn2r7WY8obapotlWKyNw+qY799TN9c9K7DI=; b=v8QSih6BmX1wMtvKj9dmsIMsiNZEMEwIr56jBGIQqAWqfqjG7egQbrTDygll3gA5r/ VSrGoFEstIekcdWsPVzRXtWAkVl4wOBpWD7whjfR/Vm5yVbRKMP9P72E3uKSqvARcdA8 lbW3aXWl58wfjjfJ47XDXDnMlZTlXdv79PMLLtakYRLpdJvqvElrdcUAZuG9MW5HjxL3 twYTmof5CaMxrN0ZHUC2vH3TsFeVpfEN5qYGsqoaQpMhKGKWxJ9lWNLfSNsutgJFQWP9 PMrh0tluOT/6BMKhvz0b/QLuAAI/bLDa13JYbWo3OnsRgv3uEk+GBWtEnfTe12wxAYD2 U4wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687174289; x=1689766289; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k1y9rG4Qmn2r7WY8obapotlWKyNw+qY799TN9c9K7DI=; b=NjSxOrhE0J2PXGkll+/KdSDUSQ+bwrVSezk4Bgx9oWzwQzkKRGHl2QWcrZSKyAPTuv kGNLp1MoiWCMRd6Azv5oTqWqu3cci8WNDMgzyzTpr4C6pK5g76v8B/LnDPlwYl4sr68U niS+Y5nZhnm9xA0eE04AmYVbZ5ct0kWMRfrTnwWqkZvRadJ7lQdD+Y1as2Ealo+4FrHK 3L04pSf96k/6tdha0X3hDXYh0EhJc/iAODBNuUVqYEFAT9lcnXeklMY4Xkk/7j7dhnz7 ZUbEmRefnjwcxqVOQ4GaOIYcied+V/6RpTx9mFZ1gD70wqqpWbZoQuhCNLynL7TgfS7Q EwcQ== X-Gm-Message-State: AC+VfDx2RhCOcysoXc+ymWFJ9fBi+d9h3Gej4FU8+F8HvmwwtmLpKjdA eQIiAkuhYj+rvw8UcorTrfczYY9LwPru3u30fK4= X-Google-Smtp-Source: ACHHUZ4i5p1N7/pS4fxHivymGPsAvRAbdg5iRJ41SRwJXPdKwn0gb0ONFMNOyau/E7anL6DNSqUZMA== X-Received: by 2002:ac2:5b05:0:b0:4f6:2b29:b446 with SMTP id v5-20020ac25b05000000b004f62b29b446mr5032907lfn.21.1687174289315; Mon, 19 Jun 2023 04:31:29 -0700 (PDT) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id i25-20020ac25239000000b004f8571275a4sm1416273lfl.96.2023.06.19.04.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 04:31:28 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> To: Imre Kaloz <kaloz@openwrt.org>, Krzysztof Halasa <khalasa@piap.pl> Cc: openwrt-devel@lists.openwrt.org, Linus Walleij <linus.walleij@linaro.org> Subject: [PATCH v1 4/5] ixp4xx: Add hdparm script Date: Mon, 19 Jun 2023 13:31:05 +0200 Message-Id: <20230619113106.2653595-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619113106.2653595-1-linus.walleij@linaro.org> References: <20230619113106.2653595-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230619_043131_707670_6973FB6E X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This script will make sure to spin down harddrives on IXP4xx NAS devices such as the NSLU2 and siblings after 1 minute of inactivity. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- .../linux/ixp4xx/base-files/etc/board.d/03_hdparm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 target/linux/ixp4x [...] Content analysis details: (-0.2 points, 5.0 required) 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:12b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series | Resurrect IXP4xx | expand |
diff --git a/target/linux/ixp4xx/base-files/etc/board.d/03_hdparm b/target/linux/ixp4xx/base-files/etc/board.d/03_hdparm new file mode 100644 index 000000000000..27f2b760420e --- /dev/null +++ b/target/linux/ixp4xx/base-files/etc/board.d/03_hdparm @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Spin down drives after one minute if inactive + +if [ ! -n "$(command -v hdparm)" ]; then + exit 0 +fi + +DISKS=$(find /dev/sd[a-z] 2>/dev/null) +for DISK in $DISKS +do + if [ -b $DISK ] ; then + hdparm -S 12 $DISK > /dev/null + fi +done
This script will make sure to spin down harddrives on IXP4xx NAS devices such as the NSLU2 and siblings after 1 minute of inactivity. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- .../linux/ixp4xx/base-files/etc/board.d/03_hdparm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 target/linux/ixp4xx/base-files/etc/board.d/03_hdparm