aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_wd-umount
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2022-01-12 11:27:51 -0500
committerRyan Kavanagh <rak@rak.ac>2022-01-12 11:27:51 -0500
commit63ad2ef4fe6198826baf862b1617576a0ccfc4e3 (patch)
tree8749b0e68290c655b31ea6d86ea1bea260ada157 /bin/executable_wd-umount
parentfix whitespace in .ssh/config template (diff)
make wd-mount/umount portable
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