open-vm-tools/vmware-user-autostart-wrapper

19 lines
334 B
Bash

#!/bin/sh
MAX_RETRY=8
RETRY=0
SLEEP=1
while [ $RETRY -lt $MAX_RETRY ]; do
if [ -f /proc/fs/vmblock/dev ]; then
/usr/bin/vmware-user-suid-wrapper
exit 0
else
logger "Try $RETRY/$MAX_RETRY : /proc/fs/vmblock/dev not available. sleeping for $SLEEP seconds"
sleep $SLEEP
RETRY=$[ $RETRY + 1 ]
SLEEP=$[ $SLEEP * 2 ]
fi
done