From patchwork Mon Jan 25 11:48:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1431163 X-Patchwork-Delegate: freifunk@adrianschmutzler.de 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=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=yWJBfTDX; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4DPSs66pvbz9s2g for ; Mon, 25 Jan 2021 22:52:10 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; 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:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pyMN/GOYCFf73h9SFnhUqEFUQKEJx27YrEXMvfu5Avw=; b=yWJBfTDXMsvbjkM3G/Z//h4zwk ITj5MXf0R8HArgS5bPUdzaKMHAWuqiEU5dDHy++Iggn2iUonjS9MKr1kyxbczoyMkloYjMm8pe2b5 XHzAhNfaeI33N8Ba9S6UrtWn3Ww47x+ufls6m9VkEz9+a1J+oss3chqGyxdASt4UvuUNIYQO89jwx VCsHhxKwB7Kp7whu08fhmkzBCbJYqHya+l0C9KMwx9QrUAoo7qxcUVVcTP9dZQMADQRRwNoojAuTB bzIV4+7HmwklnPQ8KGVemXOfR0CK8MwZuIGRKCFtB83EwT/wG4ZgWxot8bHF0F+JEXeN/FripKHfs ZiaZAQYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l40NH-0002nH-JB; Mon, 25 Jan 2021 11:49:39 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l40NF-0002mb-DE for openwrt-devel@lists.openwrt.org; Mon, 25 Jan 2021 11:49:38 +0000 Received: from buildfff.adridolf.com ([178.26.242.49]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MG9To-1lDrkN1NSW-00GaPi for ; Mon, 25 Jan 2021 12:49:31 +0100 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/2] base-files: remove execute bit and shebang from functions.sh Date: Mon, 25 Jan 2021 12:48:43 +0100 Message-Id: <20210125114843.2210-2-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210125114843.2210-1-freifunk@adrianschmutzler.de> References: <20210125114843.2210-1-freifunk@adrianschmutzler.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:HQZ55bbI1/MURlLiLsEXGwOnn8+9x10OMKqXmz0/tnpY4L9Xb0v duJZIO1m/arYhRYgZPZllN3pvu9zRMdEVmADlu4OGc0i+vSiDlk/v7jhX0XCR/et0EnagUG 5xodzIpfTS92fL7Atj42nIjtjaT3GObGnEHHnNAdRn3j5XLaJZ+g9YZuoo3V+RgwDCTje/4 paEt60hLJ5xtU8QowQPlw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:fBJpTKvcVmI=:+YrTJaT1WL0TAryupEz8Ve kb2XeHH5W9kWFHxW70sdZLg7yXJLwbO3h2lSPuUPuPWDuyXvH8dbx69C/yfDGzvXa/MtkBYJi BuXfWH4q1gShI1vJHx8+rzEaKSR9KNFgrhlDbWC1rVo45sGoqcYU8kQ/zw2zSZpjWImT7/nZe Zf4G9voCqb0Sxc9T0ipYvLltucuE6eRoSuQEtFUBsj/twI/xpISrSqpmrebMnlt68ZPfAQJiH f1nwTV++moV1bi8oa5uvT1/+avbEna+WcnFSAtm5HC6xs54E28anvHMRPMCTITTuaOQOnqsjX x0zbN9h4ifhwLbNX8MI3rkpWlbvRnKIVN1iyQqajUD9Wf2DiSYqU9cYEQhQD9wpyxs6MzcyxP DPgyRYzMlAB1iJBD3L8ITObu4ni1V6sJLMGF22w6gvhngTdFJek6oYS/apkHyhfzlsRzlWW13 DVY57Mb8Hw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_064937_654525_269F7350 X-CRM114-Status: GOOD ( 10.77 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.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 [212.227.126.135 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.135 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List 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 /lib/functions.sh was executable for no obvious reason and its execute property was even checked in package-ipkg.mk just to source it afterwards. Remove the execute bit and shebang as this is clearly a library. Signed-off-by: Adrian Schmutzler Reviewed-by: Philip Prindeville --- include/package-ipkg.mk | 4 ++-- package/base-files/files/lib/functions.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) mode change 100755 => 100644 package/base-files/files/lib/functions.sh diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index a92d692121..32de3cc93e 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -232,13 +232,13 @@ $(_endef) ( \ echo "#!/bin/sh"; \ echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \ - echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ + echo "[ -s "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_postinst \$$$$0 \$$$$@"; \ ) > postinst; \ ( \ echo "#!/bin/sh"; \ - echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ + echo "[ -s "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_prerm \$$$$0 \$$$$@"; \ ) > prerm; \ diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh old mode 100755 new mode 100644 index 272e230db2..2bad45324f --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006-2014 OpenWrt.org # Copyright (C) 2006 Fokus Fraunhofer # Copyright (C) 2010 Vertical Communications