blob: d1b6bf096d45f80eb9f8648d92e4375bf96c7e2e (
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
|
#!/bin/sh
command="%%PREFIX%%/bin/vdr"
echo -n "vdr: waiting for dvb nodes: "
i=0
while true
do
ndvb=$(ls /dev/dvb/adapter*/frontend* 2>/dev/null|wc -l|tr -d ' ')
if [ $ndvb -gt 0 ]; then
break
fi
if [ $i -ge 60 ]; then
break
fi
i=$((i + 1))
sleep 1
echo -n "."
done
i=0
while true
do
sleep 2
nndvb=$(ls /dev/dvb/adapter*/frontend* 2>/dev/null|wc -l|tr -d ' ')
echo -n " $nndvb"
if [ $nndvb -eq $ndvb ]; then
break
fi
if [ $i -ge 30 ]; then
break
fi
i=$((i + 1))
done
echo .
exec "$command" "$@"
|