From: Adrian Schmutzler Date: Thu, 7 Nov 2019 21:29:21 +0000 (+0100) Subject: base-files: remove shebang from uci-defaults files X-Git-Tag: v21.02.0-rc1~4559 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4b81c1fd570c61ca7bafa5baf750e7364bd8117f;p=openwrt%2Fopenwrt.git base-files: remove shebang from uci-defaults files uci-defaults are sourced and non-executable, so they do not require a shebang. While at it, apply consistent naming scheme. Signed-off-by: Adrian Schmutzler --- diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5c121ace24..b35d00cf94 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=207 +PKG_RELEASE:=208 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/etc/uci-defaults/10_migrate-shadow b/package/base-files/files/etc/uci-defaults/10_migrate-shadow index a354844fe4..481444f35e 100644 --- a/package/base-files/files/etc/uci-defaults/10_migrate-shadow +++ b/package/base-files/files/etc/uci-defaults/10_migrate-shadow @@ -1,5 +1,3 @@ -#!/bin/sh - ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)" spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)" diff --git a/package/base-files/files/etc/uci-defaults/12_network-generate-ula b/package/base-files/files/etc/uci-defaults/12_network-generate-ula index 8871427c60..19d7ed7f2e 100644 --- a/package/base-files/files/etc/uci-defaults/12_network-generate-ula +++ b/package/base-files/files/etc/uci-defaults/12_network-generate-ula @@ -1,5 +1,3 @@ -#!/bin/sh - [ "$(uci -q get network.globals.ula_prefix)" != "auto" ] && exit 0 r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"') diff --git a/package/base-files/files/etc/uci-defaults/13_fix-group-user b/package/base-files/files/etc/uci-defaults/13_fix-group-user new file mode 100644 index 0000000000..bf9febdfe4 --- /dev/null +++ b/package/base-files/files/etc/uci-defaults/13_fix-group-user @@ -0,0 +1,9 @@ +. /lib/functions.sh + +for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do + file="${file##*/}" + file="${file%.control}" + add_group_and_user "${file}" +done + +exit 0 diff --git a/package/base-files/files/etc/uci-defaults/13_fix_group_user b/package/base-files/files/etc/uci-defaults/13_fix_group_user deleted file mode 100644 index e6dae2419f..0000000000 --- a/package/base-files/files/etc/uci-defaults/13_fix_group_user +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh - -for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do - file="${file##*/}" - file="${file%.control}" - add_group_and_user "${file}" -done - -exit 0