Do not allow ejecting partitions

This commit is contained in:
Fierelier 2024-02-16 05:30:48 +01:00
parent 6c6d1ee43c
commit b74268e19b
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@
set -e
source "$APP_DIR/cmd/trap"
eval "$(bash "$APP_DIR/cmd/main" plist "$2")"
if ! [ "$mm_type" = "disk" ]; then
echo "$mm_path is not a disk." >&2
exit 1
fi
eject "$mm_path"
set +e
hdparm -Y "$mm_path"