Dominique Leuenberger
a65ade5922
fix bashisms in vmware-user-autostart-wrapper script OBS-URL: https://build.opensuse.org/request/show/263439 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=276
27 lines
633 B
Bash
27 lines
633 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 -qv "systemd"; 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
|
|
|