Dominique Leuenberger
bc79e93ce3
Start vmware-user-suid-wrapper unconditionally (bnc#876074) OBS-URL: https://build.opensuse.org/request/show/234364 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=260
27 lines
645 B
Bash
27 lines
645 B
Bash
#!/bin/sh
|
|
MAX_RETRY=8
|
|
RETRY=0
|
|
SLEEP=1
|
|
|
|
unset SESSION_MANAGER
|
|
|
|
# If running systemd, skip the delay loop as starting vmblock-fuse is not enforced
|
|
if ! (file /sbin/init | grep "systemd" &>/dev/null); then
|
|
|
|
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
|
|
fi
|
|
|
|
# Unconditionally start vmware-user-suid-wrapper (after waiting for vmblock-fuse if not under systemd)
|
|
/usr/bin/vmware-user-suid-wrapper
|
|
|