base-files: hotplug-call: exit success when dir is absent

This commit is contained in:
CN_SZTL 2019-11-02 07:55:05 +08:00
parent bbfe794d58
commit 5c21501084
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -11,8 +11,8 @@ USER=root
export PATH LOGNAME USER
export DEVICENAME="${DEVPATH##*/}"
[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
if [ \! -z "$1" -a -d /etc/hotplug.d/$1 ]; then
for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
[ -f $script ] && . $script
); done
}
fi