diff --git a/patches/openwrt/to-upstream/0016-base-files-add-sh-script-detection-to-hotplug-call.patch b/patches/openwrt/to-upstream/0016-base-files-add-sh-script-detection-to-hotplug-call.patch new file mode 100644 index 0000000000000000000000000000000000000000..7bcb1cdf79e9ebf77337d778adbed2c0e841f369 --- /dev/null +++ b/patches/openwrt/to-upstream/0016-base-files-add-sh-script-detection-to-hotplug-call.patch @@ -0,0 +1,30 @@ +From 3bd9f7fbae315820a88f173e6ab44c83e03837bf Mon Sep 17 00:00:00 2001 +From: Jan Pavlinec <jan.pavlinec@nic.cz> +Date: Thu, 7 Mar 2019 16:27:22 +0100 +Subject: [PATCH] base-files: add sh script detection to hotplug-call + +--- + package/base-files/files/sbin/hotplug-call | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call +index 28e957c..f7a3767 100755 +--- a/package/base-files/files/sbin/hotplug-call ++++ b/package/base-files/files/sbin/hotplug-call +@@ -13,6 +13,12 @@ export DEVICENAME="${DEVPATH##*/}" + + [ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && { + for script in $(ls /etc/hotplug.d/$1/* 2>&-); do ( +- [ -f $script ] && . $script ++ if [ -f $script ]; then ++ if grep -q '#!/bin/sh' "$script"; then ++ . $script ++ else ++ $script ++ fi ++ fi + ); done + } +-- +2.7.4 +