diff options
-rw-r--r-- | bin/executable_wd-umount | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/executable_wd-umount b/bin/executable_wd-umount index 51a11e1..08e55eb 100644 --- a/bin/executable_wd-umount +++ b/bin/executable_wd-umount @@ -7,9 +7,12 @@ case `uname` in ;; Linux) if zpool list wd-pass > /dev/null 2>&1; then - if mount -l | grep -E '^/var/lib/mpd/music '; then + if mount -l | grep -E '^/var/lib/mpd/music ' > /dev/null 2>&1; then sudo umount --lazy -f /var/lib/mpd/music fi + if mount -l | grep -E '^systemd.* on /var/lib/mpd/playlists ' > /dev/null 2>&1; then + sudo umount --lazy -f /var/lib/mpd/playlists + fi mount -l -t zfs | IFS=' on ' awk '{ print $1 }' | sudo xargs -I '{}' zfs umount -u '{}' sudo zpool export wd-pass fi |