Created waiteject.sh to wait on USB storage eject. (#374)

This commit is contained in:
Kamots 2019-03-29 18:03:54 -04:00 committed by Darren Kitchen
parent 7c8fbf0f41
commit 6760498c27

View File

@ -0,0 +1,14 @@
#!/bin/bash
#
# WAITEJECT v1 by kamotswind (https://github.com/kamotswind)
# Blocks the payload from continuing until the USB storage is ejected from the host
# Usage: WAITEJECT
function WAITEJECT() {
until [ ! -z "`dmesg | grep \"usb close backing file\"`" ]
do
sleep 1
done
}
export -f WAITEJECT