diff options
author | Joe <bousset.rudy@gmail.com> | 2022-05-21 01:29:54 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-05-21 01:29:54 +0200 |
commit | ff3ac54b6a212c1bad572fd318acc4f378fa0302 (patch) | |
tree | 88f09af226f3626a240a09cfccdce385608fc126 /.local/bin/fathddumnt | |
parent | update (diff) | |
download | dotfiles-bsd-ff3ac54b6a212c1bad572fd318acc4f378fa0302.tar.gz dotfiles-bsd-ff3ac54b6a212c1bad572fd318acc4f378fa0302.tar.bz2 dotfiles-bsd-ff3ac54b6a212c1bad572fd318acc4f378fa0302.tar.xz dotfiles-bsd-ff3ac54b6a212c1bad572fd318acc4f378fa0302.tar.zst dotfiles-bsd-ff3ac54b6a212c1bad572fd318acc4f378fa0302.zip |
cool updates
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/fathddumnt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.local/bin/fathddumnt b/.local/bin/fathddumnt index 8944ae1..241a00a 100755 --- a/.local/bin/fathddumnt +++ b/.local/bin/fathddumnt @@ -1,5 +1,13 @@ #!/bin/sh -e -umount /dev/da0p1.eli +if ! mount | grep -F /dev/da0p1; then + notify-send -u critical 'fathdd' ' HDD not mounted' + exit 1 +fi +if ! umount /dev/da0p1.eli; then + notify-send -u critical 'fathdd' ' Failed to dismount HDD' + exit 1 +fi geli detach da0p1.eli rmdir "$HOME"/hdd +notify-send -t 5000 'fathdd' ' HDD dismounted from <b>~/hdd</b>' |