. /etc/profile
/link/bin/rtc -g time

/link/shell/update.sh
mkdir /tmp/snap
mkdir /tmp/hls
mkdir /tmp/log
mkdir /root/usb
mount -t vfat /dev/sda1 /root/usb
mount -t ext4 /dev/sda1 /root/usb
ifconfig lo 127.0.0.1
/usr/php/sbin/php-fpm -R -p /usr/php -c /usr/php/etc/php.ini
/usr/nginx/sbin/nginx -p /usr/nginx 


ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
if [ -z "$ip" ]; then
/link/shell/setMac.sh
sleep 1
/link/shell/setNetwork.sh
/link/shell/cron.sh &
/link/shell/ndi.sh &
sleep 2
/link/shell/enc.sh &
/link/shell/onvif.sh
/link/bin/Gpio &
#/link/bin/OLED -platform offscreen &
sleep 2
/link/bin/PortCtrl &
#/link/bin/WifiCtrl &
fi



#mount -t nfs -o nolock 192.168.1.28:/home/zc/nfs /root/nfs
