treewide: remove execute bit and shebang from board.d files
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 26 Feb 2021 13:43:50 +0000 (14:43 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 6 Mar 2021 10:30:06 +0000 (11:30 +0100)
So far, board.d files were having execute bit set and contained a
shebang. However, they are just sourced in board_detect, with an
apparantly unnecessary check for execute permission beforehand.

Replace this check by one for existance and make the board.d files
"normal" files, as would be expected in /etc anyway.

Note:

This removes an apparantly unused '#!/bin/sh /etc/rc.common' in
target/linux/bcm47xx/base-files/etc/board.d/01_network

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
92 files changed:
package/base-files/files/bin/board_detect
package/base-files/files/etc/board.d/99-default_network [changed mode: 0755->0644]
target/linux/apm821xx/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/apm821xx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/arc770/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/archs38/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/armvirt/base-files/etc/board.d/00_model [changed mode: 0755->0644]
target/linux/at91/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ath25/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ath25/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ath79/generic/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches [changed mode: 0755->0644]
target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ath79/mikrotik/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ath79/nand/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ath79/nand/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ath79/tiny/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ath79/tiny/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/bcm27xx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/bcm47xx/base-files/etc/board.d/01_network [changed mode: 0755->0644]
target/linux/bcm4908/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/bcm53xx/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/bcm53xx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/bcm63xx/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/bcm63xx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/bmips/generic/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/bmips/nand/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/gemini/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/imx6/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ipq40xx/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ipq40xx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches [changed mode: 0755->0644]
target/linux/ipq806x/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ipq806x/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/kirkwood/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/kirkwood/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/kirkwood/base-files/etc/board.d/03_gpio_switches [changed mode: 0755->0644]
target/linux/kirkwood/base-files/etc/board.d/05_compat-version [changed mode: 0755->0644]
target/linux/lantiq/ase/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/lantiq/ase/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/lantiq/falcon/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/lantiq/xrx200/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/lantiq/xway/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/lantiq/xway/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/layerscape/base-files/etc/board.d/01_led [changed mode: 0755->0644]
target/linux/layerscape/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/layerscape/base-files/etc/board.d/03_gpio_switches [changed mode: 0755->0644]
target/linux/malta/base-files/etc/board.d/00_model [changed mode: 0755->0644]
target/linux/malta/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mediatek/mt7622/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mediatek/mt7623/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mediatek/mt7629/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mpc85xx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/mvebu/cortexa9/base-files/etc/board.d/05_compat-version [changed mode: 0755->0644]
target/linux/mxs/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/octeon/base-files/etc/board.d/01_network [changed mode: 0755->0644]
target/linux/octeontx/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/oxnas/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/pistachio/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ramips/mt7620/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ramips/mt7620/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches [changed mode: 0755->0644]
target/linux/ramips/mt7621/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ramips/mt7621/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches [changed mode: 0755->0644]
target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version [changed mode: 0755->0644]
target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ramips/mt76x8/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ramips/rt288x/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ramips/rt288x/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ramips/rt305x/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ramips/rt305x/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/ramips/rt3883/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/ramips/rt3883/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/realtek/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/realtek/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/rockchip/armv8/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/rockchip/armv8/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/sunxi/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/sunxi/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/x86/base-files/etc/board.d/01_leds [changed mode: 0755->0644]
target/linux/x86/base-files/etc/board.d/02_network [changed mode: 0755->0644]
target/linux/zynq/base-files/etc/board.d/02_network [changed mode: 0755->0644]

index 840bd0178d14101f8a36932b438d8c38ed09f1fa..94f45bec53a70a9a53fefc53e00c3279511e9f3c 100755 (executable)
@@ -6,7 +6,7 @@ CFG=$1
 
 [ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
        for a in $(ls /etc/board.d/*); do
-               [ -x $a ] || continue;
+               [ -s $a ] || continue;
                $(. $a)
        done
 }
old mode 100755 (executable)
new mode 100644 (file)
index 69bc038..f289e4e
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/system.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 6ba51b8..bfaa45f
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2015 OpenWrt.org
 # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
 
old mode 100755 (executable)
new mode 100644 (file)
index 306dfe3..3e11f40
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2014-2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index e6ab4a7..b417d8a
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright 2012-2015 OpenWrt.org
 #
 
old mode 100755 (executable)
new mode 100644 (file)
index 910df51..7402fc0
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/system.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index cca6352..45335c7
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/system.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 665504a..f279941
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2014-2016 OpenWrt.org
 # Copyright (C) 2017 LEDE project
 
old mode 100755 (executable)
new mode 100644 (file)
index 242055f..c3b43b5
@@ -1,4 +1,3 @@
-#!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2015 OpenWrt.org
 
 . /lib/functions/system.sh
old mode 100755 (executable)
new mode 100644 (file)
index d16554d..3ab22a9
@@ -1,4 +1,3 @@
-#!/bin/sh
 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
 
 . /lib/functions/system.sh
old mode 100755 (executable)
new mode 100644 (file)
index fe8a54f..33c7098
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2013-2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index 2f8d64a..3461eca
@@ -1,4 +1,3 @@
-#!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 . /lib/functions/leds.sh
old mode 100755 (executable)
new mode 100644 (file)
index 2f8d64a..3461eca
@@ -1,4 +1,3 @@
-#!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 . /lib/functions/leds.sh
old mode 100755 (executable)
new mode 100644 (file)
index 60df86e..1668b86
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2013-2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index 3e0f3ab..75418a3
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index fe21dc8..31f99fa
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
 # Copyright (c) 2011-2015 OpenWrt.org
old mode 100755 (executable)
new mode 100644 (file)
index 284f9e2..74b94a2
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index ddef4b7..81edc56
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
 # Copyright (c) 2011-2015 OpenWrt.org
old mode 100755 (executable)
new mode 100644 (file)
index 3f7fe71..c9c96e3
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2012-2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index c50b4a3..b46f0b0
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/system.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 7a83405..d4d08b2
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2015 OpenWrt.org
 
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index aa33a4a..03153b7
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2014-2015 OpenWrt.org
 
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 42f4deb..4dce204
@@ -1,4 +1,3 @@
-#!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-only
 
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index c945251..7da9de5
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2014-2016 OpenWrt.org
 # Copyright (C) 2016 LEDE-Project.org
old mode 100755 (executable)
new mode 100644 (file)
index 9ab3c81..dbffd00
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2014-2016 OpenWrt.org
 # Copyright (C) 2016 LEDE-Project.org
old mode 100755 (executable)
new mode 100644 (file)
index 5a2ca3f..381596d
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2014-2016 OpenWrt.org
 # Copyright (C) 2016 LEDE-Project.org
old mode 100755 (executable)
new mode 100644 (file)
index a8974ef..ad61dbe
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2014-2016 OpenWrt.org
 # Copyright (C) 2016 LEDE-Project.org
old mode 100755 (executable)
new mode 100644 (file)
index 95f6534..7822f80
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2013-2015 OpenWrt.org
 
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 749d99b..e62d3c2
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2014-2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index 9ba2deb..747034c
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/uci-defaults.sh
 . /lib/functions/system.sh
old mode 100755 (executable)
new mode 100644 (file)
index 8de2c8c..35ae563
@@ -1,4 +1,3 @@
-#!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-only
 #
 # Copyright (C) 2017 OpenWrt.org
old mode 100755 (executable)
new mode 100644 (file)
index 292f310..40d3226
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 5fa9ad3..6743b7e
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 47b73e0..fdef158
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index b62ad76..f943402
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index d29328e..bc91b81
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 6e8497a..ecae088
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 2568fd2..1e199db
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index bba3e2a..e97ea33
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/leds.sh
 . /lib/functions/uci-defaults.sh
old mode 100755 (executable)
new mode 100644 (file)
index 32fa00f..45153b4
@@ -1,4 +1,3 @@
-#!/bin/sh
 
 . /lib/functions/uci-defaults.sh
 
old mode 100755 (executable)
new mode 100644 (file)
index 08d31ca..5b59333
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright (C) 2013-2015 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index e9133e8..79e1191
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright © 2017 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index 05a6896..8d10c63
@@ -1,4 +1,3 @@
-#!/bin/sh
 #
 # Copyright © 2017 OpenWrt.org
 #
old mode 100755 (executable)
new mode 100644 (file)
index b3670cf..159b457
@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2015 OpenWrt.org
 
 . /lib/functions/uci-defaults.sh