modified demo script and Make file to include new .awk files, and .gifs
[keystone-rtos/netapi.git] / ti / runtime / netapi / demo / demo_setup_files / transport_dpi_demo_setup.sh
1 #!/bin/sh
3 export KERNEL_VER=$(uname -r)
5 # configure thttpd to run cgi scripts
6 sed -e 's|8080|8080 -c cgi-bin/*|g' -i /etc/init.d/thttpd
7 # reload the thttpd server
8 cd /etc/init.d
9 ./thttpd restart
11 # start Resource Manager Server
12 /usr/bin/rmServer.out /usr/bin/device/k2e/global-resource-list.dtb /usr/bin/device/k2e/policy_dsp_arm.dtb
13 #copy over web files
15 cp /etc/transportnetlib/dpi_demo/index.html /srv/www/index.html
16 chmod -x /srv/www/index.html
17 cp /etc/transportnetlib/dpi_demo/stats1.awk /srv/www/stats1.awk
18 cp /etc/transportnetlib/dpi_demo/stats2.awk /srv/www/stats2.awk
19 cp /etc/transportnetlib/dpi_demo/stats3.awk /srv/www/stats3.awk
20 cp /etc/transportnetlib/dpi_demo/stats3.awk /srv/www/stats4.awk
21 cp /etc/transportnetlib/dpi_demo/*.gif      /srv/www/
22 cp /etc/transportnetlib/dpi_demo/dpicgi1.sh /srv/www/cgi-bin/dpicgi1.sh
23 cp /etc/transportnetlib/dpi_demo/dpicgi2.sh /srv/www/cgi-bin/dpicgi2.sh
24 cp /etc/transportnetlib/dpi_demo/dpicgi3.sh /srv/www/cgi-bin/dpicgi3.sh
25 cp /etc/transportnetlib/dpi_demo/dpicgi4.sh /srv/www/cgi-bin/dpicgi4.sh
26 cp /etc/transportnetlib/dpi_demo/dpicgi4.sh /srv/www/cgi-bin/dpicgi5.sh
27 chmod +x /srv/www/cgi-bin/dpicfgi*.sh
30 #install kernel module
31 echo $KERNEL_VER
32 insmod /lib/modules/$KERNEL_VER/extra/hplibmod.ko
33 #
34 # setup linux kernel bridge to handle broadcast packets
35 ifconfig eth0 0.0.0.0
36 #
37 ifconfig eth1 0.0.0.0
38 #create bridge
39 brctl addbr br0
40 #add i/fs to bridge
41 brctl addif br0 eth0
42 #
43 brctl addif br0 eth1
44 #
45 dhclient br0
46 #
47 ifconfig br0
48 # run transport_dpi_demo application
49 cd /usr/bin
50 ./transport_dpi_demo