I have two cifs shares mount in fstab and when I shutting down computer (elementaryOS Loki) system waiting 90sec because WiFi connection was closed earlier. I tried to:

  1. Create a file /etc/init.d/umountcifs containing the CIFS unmount command:


[ "$1" = "stop" ] && umount -a -t cifs -l"

and link to it at the start of the "init.d" shutdown process like so:

sudo ln -s /etc/init.d/umountcifs /etc/rc0.d/K02umountcifs
sudo ln -s /etc/init.d/umountcifs /etc/rc6.d/K02umountcifs
  1. Add script to NetworkManager:


umount -a -l -t cifs"

to /etc/NetworkManager/dispatcher.d/pre-down.d/mount_cifs

  1. Fstab Ad the x-systemd.requires=network.target to line in fstab.

And still is the same - system waiting on shutdown. Can somebody help?

  • Same problem here. I usually run a script manually to unmount cifs shares prior to logging out. This then makes logging out fast. As my cifs shares are on VPN I must run this script while my VPN channel still exists otherwise I have to wait 1-2 mins for shutdown, too. Also tried to placing a script at pre-down.d, no success. – Top Banana Jul 19 '18 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.