Bladeren bron

base-files: remove execute bit and shebang from functions.sh

/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 <[email protected]>
Reviewed-by: Philip Prindeville <[email protected]>
Adrian Schmutzler 4 jaren geleden
bovenliggende
commit
396a35dd51
2 gewijzigde bestanden met toevoegingen van 2 en 3 verwijderingen
  1. 2 2
      include/package-ipkg.mk
  2. 0 1
      package/base-files/files/lib/functions.sh

+ 2 - 2
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; \

+ 0 - 1
package/base-files/files/lib/functions.sh

@@ -1,4 +1,3 @@
-#!/bin/sh
 # Copyright (C) 2006-2014 OpenWrt.org
 # Copyright (C) 2006 Fokus Fraunhofer <[email protected]>
 # Copyright (C) 2010 Vertical Communications