Linux下开机启动脚本 etc rcS 环境变量 pid判断

2019-07-13 06:07发布

#Linux下开机启动脚本/etc/init.d/rcS #!/bin/sh #echo "hello pqm" insmod /pqm/ko/clock_2401_dev.ko insmod /pqm/ko/clock_2401_drv.ko /pqm/ipcfg/ipconfig_eth0.sh /pqm/ipcfg/ipconfig_eth1.sh ulimit -s 4096 BFS_ROOT=/home/gx/gx61850v3 export BFS_ROOT export PATH=$PATH:$BFS_ROOT/bin: export LD_LIBRARY_PATH=$LDLIBRARY_PATH:$BFS_ROOT/lib: /pqm/pqm/iedinit & /pqm/pqm/main & /pqm/pqm/emm900 & /pqm/pqm/485ser & iedsrv & /***#1、新建文件夹,导入gx61850v3.zip 解压后,在/bin文件夹下chmod 777 * #2、设置环境变量/etc/profile下,设置启动脚本 /pm/pqm.sh #3、tftp -g -r iedinit 192.168.1.222,chmod 777 iedinit ,reboot # Ash profile # vim: syntax=sh # No core files by default ulimit -S -c 0 > /dev/null 2>&1 USER="`id -un`" LOGNAME=$USER PS1='[u@h W]# ' PATH=$PATH HOSTNAME=`/bin/hostname` export USER LOGNAME PS1 PATH BFS_ROOT=/home/gx/gx61850v3 export BFS_ROOT PATH=$PATH:$HOME/bin:$BFS_ROOT/bin: export PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BFS_ROOT/lib: export LD_LIBRARY_PATH #ntp=/pqm/pqm #export ntp #PATH=$PATH:$HOME:$ntp: #export PATH ***/ /***加入进程判断: ps -fe|grep iedtest |grep -v grep if [ $? -ne 0 ] then echo "start process....." iedtest & else echo "runing....." fi***/