增加dns
touch ${OUTPUTDIR}/rootfs/etc/resolv.conf
echo "nameserver 114.114.114.114" >> ${OUTPUTDIR}/rootfs/etc/resolv.conf
echo "nameserver 8.8.8.8" >> ${OUTPUTDIR}/rootfs/etc/resolv.conf
将libdns路径添加到环境变量
echo export LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:/appconfigs/libdns >> ${OUTPUTDIR}/rootfs/etc/profile
开启lo回环
echo "ifconfig lo up" >> ${OUTPUTDIR}/rootfs/etc/profile
设置主机名
echo "hostname localhost" >> ${OUTPUTDIR}/rootfs/etc/profile
将libdns复制到文件系统
mkdir -p ${OUTPUTDIR}/rootfs/usr/lib
cp -rf $(PROJ_ROOT)/board/sat_run/libdns $(OUTPUTDIR)/appconfigs/ -rfd;
增加localhost 域名
touch ${OUTPUTDIR}/rootfs/etc/hosts
echo "127.0.0.1 localhost:localdomain localhost" >> ${OUTPUTDIR}/rootfs/etc/hosts;
增加nesswitch.conf
touch ${OUTPUTDIR}/rootfs/etc/nsswitch.conf
echo "hosts: files dns" >> ${OUTPUTDIR}/rootfs/etc/nsswitch.conf
增加host.conf
touch ${OUTPUTDIR}/rootfs/etc/host.conf
echo "order hosts,bind" >> ${OUTPUTDIR}/rootfs/etc/hosts.conf