systemd/user/wait-for-mount.sh
2026-10-27 12:49:13 +00:00

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