From: Adrian Schmutzler Date: Mon, 25 Jan 2021 00:00:20 +0000 (+0100) Subject: treewide: drop shebang from non-executable lib files X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4ea9360bc838b57473ddc7c8a9d65e524161b8f8;p=openwrt%2Fstaging%2Fadrian.git treewide: drop shebang from non-executable lib files This drops the shebang from another bunch of files in various /lib folders, as these are sourced and the shebang is useless. Fix execute bit in one case, too. This should cover almost all trivial cases now, i.e. where /lib is actually used for library files. Signed-off-by: Adrian Schmutzler --- diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh index 14baeb37b4..a7532faa2f 100644 --- a/package/base-files/files/lib/functions/leds.sh +++ b/package/base-files/files/lib/functions/leds.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2013 OpenWrt.org get_dt_led_path() { diff --git a/package/base-files/files/lib/functions/migrations.sh b/package/base-files/files/lib/functions/migrations.sh index d2f1bc19aa..d43ea35051 100644 --- a/package/base-files/files/lib/functions/migrations.sh +++ b/package/base-files/files/lib/functions/migrations.sh @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh migrate_led_sysfs() { diff --git a/package/base-files/files/lib/functions/preinit.sh b/package/base-files/files/lib/functions/preinit.sh index 57862a11f3..591e810af9 100644 --- a/package/base-files/files/lib/functions/preinit.sh +++ b/package/base-files/files/lib/functions/preinit.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006-2013 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh old mode 100755 new mode 100644 index 2f50cd6bfd..134c527d8d --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -1,5 +1,3 @@ -#!/bin/ash - . /lib/functions.sh . /usr/share/libubox/jshn.sh diff --git a/package/base-files/files/lib/preinit/02_default_set_state b/package/base-files/files/lib/preinit/02_default_set_state index df43395726..28d5f1d9f9 100644 --- a/package/base-files/files/lib/preinit/02_default_set_state +++ b/package/base-files/files/lib/preinit/02_default_set_state @@ -1,5 +1,3 @@ -#!/bin/sh - define_default_set_state() { . /etc/diag.sh } diff --git a/package/base-files/files/lib/preinit/10_indicate_failsafe b/package/base-files/files/lib/preinit/10_indicate_failsafe index 27b94c140f..7bf5e029e4 100644 --- a/package/base-files/files/lib/preinit/10_indicate_failsafe +++ b/package/base-files/files/lib/preinit/10_indicate_failsafe @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index 423c425223..3c59929790 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/30_failsafe_wait b/package/base-files/files/lib/preinit/30_failsafe_wait index a2c2c386aa..f90de71d40 100644 --- a/package/base-files/files/lib/preinit/30_failsafe_wait +++ b/package/base-files/files/lib/preinit/30_failsafe_wait @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/40_run_failsafe_hook b/package/base-files/files/lib/preinit/40_run_failsafe_hook index 533b0a9771..e3f769a858 100644 --- a/package/base-files/files/lib/preinit/40_run_failsafe_hook +++ b/package/base-files/files/lib/preinit/40_run_failsafe_hook @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/50_indicate_regular_preinit b/package/base-files/files/lib/preinit/50_indicate_regular_preinit index 5b7523f6fd..f4afcddb44 100644 --- a/package/base-files/files/lib/preinit/50_indicate_regular_preinit +++ b/package/base-files/files/lib/preinit/50_indicate_regular_preinit @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/70_initramfs_test b/package/base-files/files/lib/preinit/70_initramfs_test index 8504e34db0..c5aae983c7 100644 --- a/package/base-files/files/lib/preinit/70_initramfs_test +++ b/package/base-files/files/lib/preinit/70_initramfs_test @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root index a15c972220..3f75411a43 100644 --- a/package/base-files/files/lib/preinit/80_mount_root +++ b/package/base-files/files/lib/preinit/80_mount_root @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/99_10_failsafe_login b/package/base-files/files/lib/preinit/99_10_failsafe_login index 16ad84f4ba..1410c5f0db 100644 --- a/package/base-files/files/lib/preinit/99_10_failsafe_login +++ b/package/base-files/files/lib/preinit/99_10_failsafe_login @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006-2015 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/preinit/99_10_run_init b/package/base-files/files/lib/preinit/99_10_run_init index b4f0ec203d..ebf77b0896 100644 --- a/package/base-files/files/lib/preinit/99_10_run_init +++ b/package/base-files/files/lib/preinit/99_10_run_init @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index c28bae48a1..968893e226 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -1,5 +1,3 @@ -#!/bin/sh - RAM_ROOT=/tmp/root export BACKUP_FILE=sysupgrade.tgz # file extracted by preinit diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index ad04bbc753..e6f58df4f5 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2014 OpenWrt.org # diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 4f77cf2219..fca800a541 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uci -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh index 1e85ced834..8d32cd1743 100644 --- a/package/system/uci/files/lib/config/uci.sh +++ b/package/system/uci/files/lib/config/uci.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Shell script compatibility wrappers for /sbin/uci # # Copyright (C) 2008-2010 OpenWrt.org diff --git a/package/system/urandom-seed/Makefile b/package/system/urandom-seed/Makefile index 7cb7c72038..7c5524a9db 100644 --- a/package/system/urandom-seed/Makefile +++ b/package/system/urandom-seed/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=urandom-seed -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-2.0-only include $(INCLUDE_DIR)/package.mk diff --git a/package/system/urandom-seed/files/lib/preinit/81_urandom_seed b/package/system/urandom-seed/files/lib/preinit/81_urandom_seed index 26212c60b5..2adc6c47f0 100644 --- a/package/system/urandom-seed/files/lib/preinit/81_urandom_seed +++ b/package/system/urandom-seed/files/lib/preinit/81_urandom_seed @@ -1,5 +1,3 @@ -#!/bin/sh - log_urandom_seed() { echo "urandom-seed: $1" > /dev/kmsg } diff --git a/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq b/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq index 4f7dc6673c..5f059ee974 100644 --- a/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq +++ b/target/linux/lantiq/base-files/lib/preinit/05_set_preinit_iface_lantiq @@ -1,8 +1,5 @@ -#!/bin/sh - set_preinit_iface() { ifname=eth0 } boot_hook_add preinit_main set_preinit_iface - diff --git a/target/linux/mediatek/mt7622/base-files/lib/preinit/79_move_config b/target/linux/mediatek/mt7622/base-files/lib/preinit/79_move_config index 865a5fb90c..8a30b84497 100644 --- a/target/linux/mediatek/mt7622/base-files/lib/preinit/79_move_config +++ b/target/linux/mediatek/mt7622/base-files/lib/preinit/79_move_config @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/upgrade/common.sh RECOVERY_PART=/dev/mmcblk0p6 diff --git a/target/linux/tegra/base-files/lib/preinit/79_move_config b/target/linux/tegra/base-files/lib/preinit/79_move_config index d17e734ac8..ff1c7c1ed7 100644 --- a/target/linux/tegra/base-files/lib/preinit/79_move_config +++ b/target/linux/tegra/base-files/lib/preinit/79_move_config @@ -1,5 +1,3 @@ -#!/bin/sh - move_config() { local partdev @@ -19,4 +17,3 @@ move_config() { } boot_hook_add preinit_mount_root move_config -