Move scripts to bin/ directory

This commit is contained in:
2026-09-08 02:45:25 +08:00
parent 7afd4fdd0c
commit bdb089dee5
11 changed files with 0 additions and 0 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# wait until nbd is ready
APP_DIR="$(dirname "$0")"
NBD_READY="$APP_DIR/nbd-ready"
INTERVAL=0.5
TIMEOUT=$1
SECONDS=0
until $NBD_READY; do
if [ "$TIMEOUT" ] && (( SECONDS >= "$TIMEOUT" )); then
echo "Timeout waiting for NBD" >&2
exit 1
fi
sleep $INTERVAL
done