Fix umount when virtiofs was never used (slice does not exist).

This commit is contained in:
Andreas B. Mundt 2023-09-08 11:27:42 +02:00
parent 09ffead361
commit 9560228f3b

View file

@ -30,9 +30,9 @@ if [[ "$mtp" =~ "/lmn/media/$usr/share" ]] ; then
sleep 5 # leave some time to write caches … sleep 5 # leave some time to write caches …
sudo -u ${usr} killall gvfsd | systemd-cat sudo -u ${usr} killall gvfsd | systemd-cat
sudo -u ${usr} killall dbus-daemon | systemd-cat sudo -u ${usr} killall dbus-daemon | systemd-cat
systemctl kill system-virtiofs.slice systemctl kill system-virtiofs.slice || true
# debug to find processes blocking umount: # debug to find processes blocking umount:
# lsof > /tmp/lsof.log # lsof >> /var/log/lsof.log
fi fi
## Just umount: ## Just umount: