Place list of loaded modules in /var/run directly

Do not use /var/run/qubes for this, as it may be non-root writeable and
someone may want to isolate root/user.
Also, remove the file after resume.

(cherry picked from commit 79b38cf106)
This commit is contained in:
Marek Marczykowski-Górecki 2018-01-22 19:11:50 +01:00
parent ab80284759
commit d9206f0aa0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -36,11 +36,13 @@ if [ x"$action" = x"suspend" ]; then
modprobe -r $mod
fi
done
echo $LOADED_MODULES > /var/run/qubes/suspend-modules-loaded
echo "$LOADED_MODULES" > /var/run/qubes-suspend-modules-loaded
else
for mod in `cat /var/run/qubes/suspend-modules-loaded`; do
modprobe $mod
# shellcheck disable=SC2013
for mod in $(cat /var/run/qubes-suspend-modules-loaded); do
modprobe "$mod"
done
rm -f /var/run/qubes-suspend-modules-loaded
if qsvc network-manager ; then
dbus-send --system --print-reply \
--dest=org.freedesktop.NetworkManager \