Skip to content
Snippets Groups Projects
Verified Commit 37592e69 authored by Jan Pavlinec's avatar Jan Pavlinec
Browse files

patches/openwrt: fix base-file hotplug-call

parent 0655fbef
Branches
Tags
1 merge request!123Turris OS 5.0 (HBK)
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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment