summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-system/firstboot.sh
blob: 366874a393365ef4fc54a4f7dc3d191963451fb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
. ~/.configured
ATTEMPT=0
function try_smolt {
	((ATTEMPT=ATTEMPT+1))
	echo $ATTEMPT
	status=$(echo "jump mythsmolt" | telnet localhost 6546 2>&1)
	echo $status|grep -q refused
 	status=$?
	if [ $status  != 0  ]
	then
		fb_status=0
		echo "FB=NO" > ~/.configured
	fi
	if [ $ATTEMPT = 200 ]
	then
		fb_status=0
	fi
}

if [ ! -e /tmp/debug ]
then
	if [ ! -e /tmp/nomfe ]
	then
		if [ ! -e ~/.mythtv/pub-uuid ]
		then
			if [ x$FB != xNO ]
			then
				fb_status=4
				while [ $fb_status != 0 ]
				do
					try_smolt
					if [ $fb_status != 0  ]
					then
						sleep 1
					fi
				done
			fi
		fi
	fi
fi