QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 722|回复: 2

how to start my shell-script?

[复制链接]
发表于 2005-3-22 20:47:56 | 显示全部楼层 |阅读模式
how to start my shell-script,should i write all words of hte script direkt to /etc/rc.d/rc.local , and it will work after reboot?

at first i open this file /etc/rc.d/rc.local , there are some words :
#!/bin/sh
touch  /var/lock/subsys/local

then i write my words after the second row ? such as:
iptables -A INPUT -t filter -p tcp --dport 22 -j ACCEPT
..............................................
then save and quit?


why does it make a file names local?
thanks!
发表于 2005-3-22 21:49:07 | 显示全部楼层
touch made the file named local.
回复

使用道具 举报

发表于 2005-3-25 22:15:44 | 显示全部楼层
wo bu zhi dao ni zai wen shen me, wo bu hui ying yu, zhi neng shuo pin yin le.
ha ha ha, this is the same for all over the world!
test it:
chmod a+x [your_program]
for example
#vi lsn
ls -n -a
:wq
#chmod a+x lsn
#./lsn
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-6 11:45 , Processed in 0.038645 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表