treewide: drop shebang from non-executable target files

This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2020-06-06 23:13:41 +02:00
parent b7a8a54542
commit 48c1fdd046
61 changed files with 4 additions and 99 deletions

View File

@ -1,5 +1,3 @@
#!/bin/sh
preinit_set_mac_address() { preinit_set_mac_address() {
. /lib/functions.sh . /lib/functions.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
apm821xx_set_preinit_iface() { apm821xx_set_preinit_iface() {
ifname=eth0 ifname=eth0
} }

View File

@ -1,5 +1,3 @@
#!/bin/sh
BOOTPART=/dev/sda1 BOOTPART=/dev/sda1
move_config() { move_config() {

View File

@ -1,5 +1,3 @@
#!/bin/sh
PART_NAME=firmware PART_NAME=firmware
REQUIRE_IMAGE_METADATA=1 REQUIRE_IMAGE_METADATA=1

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2015 OpenWrt.org # Copyright (C) 2015 OpenWrt.org
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
do_arc() { do_arc() {
. /lib/arc.sh . /lib/arc.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
do_arc() { do_arc() {
. /lib/arc.sh . /lib/arc.sh

1
target/linux/at91/base-files/lib/at91.sh Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2014 OpenWrt.org # Copyright (C) 2014 OpenWrt.org
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
do_at91() { do_at91() {
. /lib/at91.sh . /lib/at91.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
# reset button only supported on ar5315+ at the moment # reset button only supported on ar5315+ at the moment
preinit_ip() { preinit_ip() {
if [ -z "$pi_ifname" ]; then if [ -z "$pi_ifname" ]; then

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/migrations.sh . /lib/functions/migrations.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
fix_seama_header() { fix_seama_header() {

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2018 Weijie Gao <hackpascal@gmail.com> # Copyright (C) 2018 Weijie Gao <hackpascal@gmail.com>
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
preinit_set_mac_address() { preinit_set_mac_address() {

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/migrations.sh . /lib/functions/migrations.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2015-2016 OpenWrt.org # Copyright (C) 2015-2016 OpenWrt.org
# Copyright (C) 2017 LEDE project # Copyright (C) 2017 LEDE project

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org # Copyright (C) 2015 OpenWrt.org
. /lib/upgrade/common.sh . /lib/upgrade/common.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2014-2015 OpenWrt.org # Copyright (C) 2014-2015 OpenWrt.org
# #

View File

@ -1,7 +1,5 @@
#!/bin/sh
# #
# Copyright (C) 2007 OpenWrt.org # Copyright (C) 2007 OpenWrt.org
# #
#
mtd fixtrx firmware mtd fixtrx firmware

View File

@ -1,5 +1,3 @@
#!/bin/sh
do_sysinfo_bcm47xx() { do_sysinfo_bcm47xx() {
local boardtype="$(nvram get boardtype)" local boardtype="$(nvram get boardtype)"
local boardnum="$(nvram get boardnum)" local boardnum="$(nvram get boardnum)"

View File

@ -1,5 +1,3 @@
#!/bin/sh
kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd) kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
mtd ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0 mtd ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0

View File

@ -1,8 +1,6 @@
#!/bin/sh
# #
# Copyright (C) 2007 OpenWrt.org # Copyright (C) 2007 OpenWrt.org
# #
#
. /lib/functions.sh . /lib/functions.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
CNS3XXX_BOARD_NAME= CNS3XXX_BOARD_NAME=
CNS3XXX_MODEL= CNS3XXX_MODEL=

View File

@ -1,5 +1,3 @@
#!/bin/sh
do_sysinfo_cns3xxx() { do_sysinfo_cns3xxx() {
. /lib/cns3xxx.sh . /lib/cns3xxx.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2019 OpenWrt.org # Copyright (C) 2019 OpenWrt.org
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/system.sh . /lib/functions/system.sh

1
target/linux/imx6/base-files/lib/imx6.sh Executable file → Normal file
View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2010-2013 OpenWrt.org # Copyright (C) 2010-2013 OpenWrt.org
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
do_sysinfo_imx6() { do_sysinfo_imx6() {
. /lib/imx6.sh . /lib/imx6.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/imx6.sh . /lib/imx6.sh
. /lib/functions.sh . /lib/functions.sh
. /lib/upgrade/common.sh . /lib/upgrade/common.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
preinit_set_mac_address() { preinit_set_mac_address() {

View File

@ -1,5 +1,3 @@
#!/bin/sh
set_preinit_iface() { set_preinit_iface() {
. /lib/functions.sh . /lib/functions.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2018 OpenWrt.org # Copyright (C) 2018 OpenWrt.org
# #

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2013 OpenWrt.org # Copyright (C) 2013 OpenWrt.org
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
IFNAME_CHANGED=0 IFNAME_CHANGED=0

View File

@ -1,5 +1,3 @@
#!/bin/sh
reorder_layerscape_interfaces() { reorder_layerscape_interfaces() {
if [ ! -f /tmp/sysinfo/board_name ]; then if [ ! -f /tmp/sysinfo/board_name ]; then
echo "No board name found, not doing reorder_layerscape_interfaces" echo "No board name found, not doing reorder_layerscape_interfaces"

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright 2015-2019 Traverse Technologies # Copyright 2015-2019 Traverse Technologies
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
set_preinit_iface() { set_preinit_iface() {
ifconfig eth0 up ifconfig eth0 up
ifname=lan1 ifname=lan1

View File

@ -1,5 +1,3 @@
#!/bin/sh
set_rps_sock_flow() { set_rps_sock_flow() {
echo 1024 > /proc/sys/net/core/rps_sock_flow_entries echo 1024 > /proc/sys/net/core/rps_sock_flow_entries
} }

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2018 OpenWrt.org # Copyright (C) 2018 OpenWrt.org
RECOVERY_PART=/dev/mmcblk0p1 RECOVERY_PART=/dev/mmcblk0p1

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org # Copyright (C) 2015 OpenWrt.org
. /lib/upgrade/common.sh . /lib/upgrade/common.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2013 OpenWrt.org # Copyright (C) 2013 OpenWrt.org
# #

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org # Copyright (C) 2015 OpenWrt.org
. /lib/functions.sh . /lib/functions.sh

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2015 OpenWrt.org # Copyright (C) 2015 OpenWrt.org
# #

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2017 LEDE-Project.org # Copyright (C) 2017 LEDE-Project.org
# #

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2014 OpenWrt.org # Copyright (C) 2014 OpenWrt.org
move_config() { move_config() {

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2012-2015 OpenWrt.org # Copyright (C) 2012-2015 OpenWrt.org
move_config() { move_config() {

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2017 OpenWrt.org # Copyright (C) 2017 OpenWrt.org
# #

View File

@ -1,4 +1,3 @@
#!/bin/sh
# #
# Copyright (C) 2012 OpenWrt.org # Copyright (C) 2012 OpenWrt.org
# #

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/migrations.sh . /lib/functions/migrations.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/migrations.sh . /lib/functions/migrations.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
mt7621_bringup_dsa_master() { mt7621_bringup_dsa_master() {

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/migrations.sh . /lib/functions/migrations.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/migrations.sh . /lib/functions/migrations.sh

View File

@ -1,5 +1,3 @@
#!/bin/sh
# Netgear WNCE2001 has does a checksum check on boot and goes into recovery # Netgear WNCE2001 has does a checksum check on boot and goes into recovery
# tftp mode when the check fails. Initializing the JFFS2 partition triggers # tftp mode when the check fails. Initializing the JFFS2 partition triggers
# this, so we make sure to zero checksum and size to be checksummed before # this, so we make sure to zero checksum and size to be checksummed before

View File

@ -1,5 +1,3 @@
#!/bin/sh
# Netgear WNCE2001 has does a checksum check on boot and goes into recovery # Netgear WNCE2001 has does a checksum check on boot and goes into recovery
# tftp mode when the check fails. Initializing the JFFS2 partition triggers # tftp mode when the check fails. Initializing the JFFS2 partition triggers
# this, so we make sure to zero checksum and size to be checksummed before # this, so we make sure to zero checksum and size to be checksummed before

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2010 OpenWrt.org # Copyright (C) 2010 OpenWrt.org
do_mount_xenfs() { do_mount_xenfs() {

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2018 OpenWrt.org # Copyright (C) 2018 OpenWrt.org
do_load_x86_ucode() { do_load_x86_ucode() {

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2006-2010 OpenWrt.org
# Copyright (C) 2010 Vertical Communications # Copyright (C) 2010 Vertical Communications

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2012-2015 OpenWrt.org # Copyright (C) 2012-2015 OpenWrt.org
move_config() { move_config() {

View File

@ -1,5 +1,3 @@
#!/bin/sh
upgrade_bootloader() { upgrade_bootloader() {
local diskdev local diskdev

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Copyright (C) 2010 OpenWrt.org # Copyright (C) 2010 OpenWrt.org
do_mount_xenfs() { do_mount_xenfs() {