1bf215546Sopenharmony_ci#!/bin/sh 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ciset -ex 4bf215546Sopenharmony_ci 5bf215546Sopenharmony_ci_XORG_SCRIPT="/xorg-script" 6bf215546Sopenharmony_ci_FLAG_FILE="/xorg-started" 7bf215546Sopenharmony_ci 8bf215546Sopenharmony_ciecho "touch ${_FLAG_FILE}; sleep 100000" > "${_XORG_SCRIPT}" 9bf215546Sopenharmony_ciif [ "x$1" != "x" ]; then 10bf215546Sopenharmony_ci export LD_LIBRARY_PATH="${1}/lib" 11bf215546Sopenharmony_ci export LIBGL_DRIVERS_PATH="${1}/lib/dri" 12bf215546Sopenharmony_cifi 13bf215546Sopenharmony_cixinit /bin/sh "${_XORG_SCRIPT}" -- /usr/bin/Xorg vt45 -noreset -s 0 -dpms -logfile /Xorg.0.log & 14bf215546Sopenharmony_ci 15bf215546Sopenharmony_ci# Wait for xorg to be ready for connections. 16bf215546Sopenharmony_cifor i in 1 2 3 4 5; do 17bf215546Sopenharmony_ci if [ -e "${_FLAG_FILE}" ]; then 18bf215546Sopenharmony_ci break 19bf215546Sopenharmony_ci fi 20bf215546Sopenharmony_ci sleep 5 21bf215546Sopenharmony_cidone 22