add mythfront.config support
[vuplus_openembedded] / mythfront / mythfront-config / tftp.sh
1 #!/bin/sh
2
3 case $1 in
4   renew|bound)
5         ;;
6   *)
7         exit 0
8         ;;
9 esac
10
11 bootdir=`dirname $boot_file`
12
13 files="mysql.txt lircrc mythfront.config"
14
15 mkdir /var/lib/config
16 cd /var/lib/config
17
18 for fn in $files; do
19   if ! tftp -g $serverid -r $bootdir/mythfront/$ip/$fn -l $fn; then
20     if ! tftp -g $serverid -r $bootdir/mythfront/default/$fn -l $fn; then
21       rm -f $fn
22     fi
23   fi
24 done
25
26 if [ -f ./mythfront.config ]; then
27   . ./mythfront.config
28   if [ "x$REMOTE" != "x" ]; then
29     fn=`find /usr/share/lirc/remotes -name lircd.conf.$REMOTE`
30     if [ "x$fn" != "x" ]; then
31       rm -f lircd.conf
32       ln -sf $fn lircd.conf
33     fi
34   fi
35 fi
36