+function start_sessiond()
+{
+ if [ -n $TEST_NO_SESSIOND ] && [ "$TEST_NO_SESSIOND" == "1" ]; then
+ # Env variable requested no session daemon
+ return
+ fi
+
+ spawn_sessiond
+ out=$?
+ if [ $out -eq 2 ]; then
+ # Kernel version is not compatible.
+ exit 0
+ elif [ $out -ne 0 ]; then
+ echo "NOT bad $?"
+ exit 1
+ fi
+
+ # Simply wait for the session daemon bootstrap
+ echo "Waiting for the session daemon to bootstrap (2 secs)"
+ sleep 2
+}
+