鱼鱼游 发表于 2005-3-12 10:33:17

如何做到开机自动运行一个命令?

如题!


谢谢!

月下刀客 发表于 2005-3-12 10:50:39

/etc/rc.d/rc.local文件里

鱼鱼游 发表于 2005-3-12 11:22:22

谢谢刀客!


我的这个文件是这样的:
----------------------------------------
#!/bin/sh
#
# 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
iptables-restore < /etc/sysconfig/iptables
-----------------------------------------
请问是不是这样touch /var/lock/subsys/local
iptables-restore < /etc/sysconfig/iptables
把新的依此添加就可以了呢?


请问touch /var/lock/subsys/local
这句是什么意思?


谢谢!

wusong-2005 发表于 2005-3-13 06:48:32

touch 是更新文件的time stamp.
页: [1]
查看完整版本: 如何做到开机自动运行一个命令?