aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_wd-umount
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2023-06-24 15:27:14 -0400
committerRyan Kavanagh <rak@rak.ac>2023-06-24 15:27:14 -0400
commit06f81f8fe4d3adcd1f3fd4cab29c9bb9c8fcb487 (patch)
treef2023ea099f71587a3aa2e999c008fbfba0da55f /bin/executable_wd-umount
parentwd-mount (diff)
wd-umount
Diffstat (limited to 'bin/executable_wd-umount')
-rw-r--r--bin/executable_wd-umount5
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