Fix block hotplug script locking

Do not let hotplug script inherit lock FD - if it starts some long
running process (like xenstore-watch), it will hold the lock and block other scripts.
This commit is contained in:
Marek Marczykowski-Górecki 2014-06-27 00:08:30 +02:00
parent b2162b1af9
commit 5443826fff

View File

@ -50,7 +50,7 @@ export PATH="/sbin:/bin:/usr/bin:/usr/sbin:$PATH"
XENBUS_PATH="${XENBUS_PATH:?}"
if ! [ "$1" = "add" ] || ! [ -f /var/run/qubes/fast-block-attach ] ; then
exec flock /var/run/qubes/hotplug-block /etc/xen/scripts/block "$@"
exec flock -o /var/run/qubes/hotplug-block /etc/xen/scripts/block "$@"
fi
ORIG_ARGS="$@"