15 lines
239 B
Bash
15 lines
239 B
Bash
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
mountpoint_dir=$1
|
|
attempt=0
|
|
|
|
while ! mountpoint -q "$mountpoint_dir"; do
|
|
attempt=$((attempt + 1))
|
|
if [ "$attempt" -ge 100 ]; then
|
|
echo "Timed out waiting for mount: $mountpoint_dir" >&2
|
|
exit 1
|
|
fi
|
|
sleep 0.1
|
|
done
|