[root@ /]# vi /filename/filename.sh
insmod /filename/ko/clock_2401_dev.ko
insmod /filename/ko/clock_2401_drv.ko
/filename/ipcfg/ipconfig_eth0.sh
/filename/ipcfg/ipconfig_eth1.sh
#更改线程占用的虚拟内存,默认1024*8
ulimit -s 2048
sleep 4
echo "-------------iedsrv start--------------"
#iedsrv &
echo "--------------iedinit start------------"
/filename/filename/iedinit &
echo "-------------main start------------"
/filename/filename/main &
/filename/filename/emm900 &
/filename/filename/485ser &
- /filename/filename.sh
- #环境变量添加设置
BFS_ROOT=/home/gx/gx61850v3
export BFS_ROOT
export PATH=$BFS_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$BFS_ROOT/lib:$LD_LIBRARY_PATH
sleep 4
echo "-------------iedsrv start--------------"
#iedsrv &
echo "--------------iedinit start------------"
/filename/filename/iedinit &
echo "-------------main start------------"
/filename/filename/main &
/filename/filename/emm900 &
/filename/filename/485ser &
#判断进程是否启动,没有的话控制启动
ps -fe|grep iedtest |grep -v grep
if [ $? -ne 0 ]
then
echo "start process....."
iedsrv &
else
echo "runing....."
fi
//用户环境变量设置 vi /etc/profile
//开机启动脚本设置 vi /etc/init.d/rcS
阅读更多