[已解决][问题]arp -f这个命令如何实现开机自启动?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- fanglei03
- 帖子: 135
- 注册时间: 2008-02-23 21:52
[已解决][问题]arp -f这个命令如何实现开机自启动?
我在/etc/ethers中添加了ip mac,arp -f也成功绑定了,问题是每次开机都要手工绑一次,
我想让Ubuntu 实现开机自动绑定,不知道该怎么弄。。。
上网查了一下,说是在/etc/rc.d/rc.local下添加,但是我的系统中根本没有这个文件
我想让Ubuntu 实现开机自动绑定,不知道该怎么弄。。。
上网查了一下,说是在/etc/rc.d/rc.local下添加,但是我的系统中根本没有这个文件
上次由 fanglei03 在 2008-03-02 15:15,总共编辑 1 次。
- fanglei03
- 帖子: 135
- 注册时间: 2008-02-23 21:52
但是我看了这个文件里的注释yaoms 写了:ubuntu中这个文件位于 /etc/rc.local 而不是 /etc/rc.d/rc.local
在里面添加你要执行的命令就行了
代码: 全选
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
代码: 全选
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
^_^ ~~~
要理解递归,首先要理解递归。
地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
要理解递归,首先要理解递归。
地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
这个脚本将会在每个多用户运行级的最后执行BigSnake.NET 写了:代码: 全选
# This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error.
请确保脚本在成功时返回0, 在错误时返回非0
^_^ ~~~
要理解递归,首先要理解递归。
地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
要理解递归,首先要理解递归。
地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
- fanglei03
- 帖子: 135
- 注册时间: 2008-02-23 21:52
试过了,不行,我是直接在
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
后面加了一行:arp -f
....
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
后面加了一行:arp -f
....
- yaoms
- 帖子: 4952
- 注册时间: 2007-10-19 14:51
- 来自: 深圳