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.
This commit is contained in:
Marek Marczykowski-Górecki 2018-01-22 19:11:50 +01:00
parent 977f41276b
commit 79b38cf106
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -41,12 +41,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
# shellcheck disable=SC2013
for mod in $(cat /var/run/qubes/suspend-modules-loaded); do
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 \