aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_wd-umount
diff options
context:
space:
mode:
Diffstat (limited to 'bin/executable_wd-umount')
-rw-r--r--[-rwxr-xr-x]bin/executable_wd-umount22
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/executable_wd-umount b/bin/executable_wd-umount
index 8b1ec47..6d9ecbe 100755..100644
--- a/bin/executable_wd-umount
+++ b/bin/executable_wd-umount
@@ -1,7 +1,19 @@
#!/bin/sh
-sudo umount --lazy -f /var/lib/mpd/music
-sudo zpool export -f ztosh
-sudo cryptdisks_stop tosh
-sudo vgchange -an tosh
-sudo vgexport tosh
+case `uname` in
+ OpenBSD)
+ doas umount /mnt/wd
+ doas bioctl -d sd3
+ ;;
+ 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
+ ;;
+ *)
+ echo "Unknown host"
+ exit 1
+ ;;
+esac