2009-06-10 15:30:14 +02:00
|
|
|
#!/bin/sh
|
|
|
|
MAX_RETRY=8
|
|
|
|
RETRY=0
|
|
|
|
SLEEP=1
|
|
|
|
|
2012-08-04 12:48:13 +02:00
|
|
|
unset SESSION_MANAGER
|
|
|
|
|
2014-05-18 15:10:04 +02:00
|
|
|
# If running systemd, skip the delay loop as starting vmblock-fuse is not enforced
|
|
|
|
if ! (file /sbin/init | grep "systemd" &>/dev/null); then
|
2009-06-10 15:30:14 +02:00
|
|
|
|
2014-05-18 15:10:04 +02:00
|
|
|
while [ $RETRY -lt $MAX_RETRY ]; do
|
|
|
|
|
|
|
|
if [ -f /var/run/vmblock-fuse/dev ]; then
|
|
|
|
RETRY=$MAX_RETRY
|
|
|
|
else
|
|
|
|
logger "Try $RETRY/$MAX_RETRY : /var/run/vmblock-fuse/dev not available. sleeping for $SLEEP seconds"
|
|
|
|
sleep $SLEEP
|
|
|
|
RETRY=$[ $RETRY + 1 ]
|
|
|
|
SLEEP=$[ $SLEEP * 2 ]
|
|
|
|
fi
|
|
|
|
done
|
2009-06-10 15:30:14 +02:00
|
|
|
fi
|
2014-05-18 15:10:04 +02:00
|
|
|
|
|
|
|
# Unconditionally start vmware-user-suid-wrapper (after waiting for vmblock-fuse if not under systemd)
|
|
|
|
/usr/bin/vmware-user-suid-wrapper
|
|
|
|
|