#!/bin/bash## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don't# want to do the full Sys V style init stuff.touch /var/lock/subsys/local/bin/echo $PATH>/opt/java/path.txtsource /etc/profile/bin/echo $PATH>>/opt/java/path.txt/bin/echo "i am liyuan ">/opt/java/test.txtnohup java -jar JavaBridge.jar SERVLET_LOCAL:9090>/dev/null 2>&1 &~这是rc.local文件。最后一条命令开机后没执行,开机后我运行/etc/rc.d/rc.local 其中最后的nohup命令是可以执行的,我是了其他命令,遇到nohup命令都不能执行,是不是nohup这个命令的原因?求解,求大神指导,谢谢了。
上面的格式乱的代码不用看
#!/bin/bash
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/bin/echo $PATH>/opt/java/path.txt
source /etc/profile
/bin/echo $PATH>>/opt/java/path.txt
/bin/echo "i am liyuan ">/opt/java/test.txt
nohup java -jar JavaBridge.jar SERVLET_LOCAL:9090>/dev/null 2>&1 &
补充rc.local 文件