aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_wd-umount
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2022-11-26 17:40:31 -0500
committerRyan Kavanagh <rak@rak.ac>2022-11-26 17:40:31 -0500
commit43c6592c201d03c7a8a1bdf704ac21705cc96e11 (patch)
tree1ae75932a43582f9f2c3c6b2107f21c6a476e99b /bin/executable_wd-umount
parentResign SSH keys (diff)
wd-*mount uses zfs directly now
Diffstat (limited to '')
-rw-r--r--bin/executable_wd-umount12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/executable_wd-umount b/bin/executable_wd-umount
index e44c3ad..51a11e1 100644
--- a/bin/executable_wd-umount
+++ b/bin/executable_wd-umount
@@ -6,11 +6,13 @@ case `uname` in
doas bioctl -d 79665ba14a5187ba
;;
Linux)
- sudo umount --lazy -f /var/lib/mpd/music
- sudo zpool export -f ztosh
- sudo cryptdisks_stop tosh
- sudo vgchange -an tosh
- sudo vgexport tosh
+ if zpool list wd-pass > /dev/null 2>&1; then
+ if mount -l | grep -E '^/var/lib/mpd/music '; then
+ sudo umount --lazy -f /var/lib/mpd/music
+ fi
+ mount -l -t zfs | IFS=' on ' awk '{ print $1 }' | sudo xargs -I '{}' zfs umount -u '{}'
+ sudo zpool export wd-pass
+ fi
;;
*)
echo "Unknown host"