📄 ipid.sh
字号:
#!/bin/bash#mount filesystemmount -t squashfs /dev/mtdblock2 /softwaremount -t yaffs2 /dev/mtdblock3 /configmount none /tmp -t ramfs -nsource /config/www/network.conf if [ ! -n "$MACADDR" ]; then echo "IPADDR is empty" MACADDR=AA:11:12:13:14:15 fiif [ "$DHCPC" = "1" ]; then echo " run DHCPC" /sbin/udhcpc -t 3 -q /usr/writedhcpcelse if [ ! -n "$IPADDR" ]; then echo "IPADDR is empty" IPADDR=192.168.3.40 fi if [ ! -n "$NETMASK" ]; then echo "NETMASK is empty" NETMASK=255.255.255.0 fi if [ ! -n "$GATEWAY" ]; then echo "GATEWAY is empty" GATEWAY=192.168.3.1 fi if [ ! -n "$DNS1" ]; then echo "DNS1 is empty" DNS1=61.235.70.98 fi if [ ! -n "$DNS2" ]; then echo "DNS2 is empty" DNS2=211.98.4.1 fi if [ ! -n "$NTPSERVER" ]; then echo "NTPSERVER is empty" NTPSERVER=61.129.42.44 fi /sbin/ifconfig eth0 down /sbin/ifconfig eth0 hw ether $MACADDR /sbin/ifconfig eth0 up /sbin/ifconfig eth0 $IPADDR netmask $NETMASK# /sbin/route -n > /config/www/route.tmp# /usr/readroute# source /config/www/route.tmp# /sbin/route del default gw $GATEWAYORG /sbin/route add default gw $GATEWAY# /bin/nslookup server $DNS2# /bin/nslookup server $DNS1 fiecho "get GMT time" /bin/ntpdate $NTPSERVERecho "config the network interface"/sbin/ifconfig lo 127.0.0.1/sbin/ifconfig eth1 192.168.5.1echo "start webserver"httpd -c /config/www/httpd.conf -h /var/www/export PATH=$PATH:/software/radio/bin:/software:/configexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/software/lib:/usr/lib:/lib:/usr/local/lib ifconfig -aecho "......ready to start iPid application......"echo "............................................"#sipphone1029 &#radioapp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -