|
RK 3288开发板ip怎么开机启动自动修改?
发表于 2016-11-3 16:52:25
浏览:7127
|
回复:5
打印
只看该作者
[复制链接]
楼主
rk 3288开发板有没有谁开机自动修改过ip的,比如我想开机把开发板的ip通过命令修改为 sudo ifconfig eth0 192.168.0.11修改为192.168.0.11,
我写了一个脚本内容如下:
------------------------------
#! /bin/sh
sudo ifconfig eth0 192.168.0.11
----------------------------------------
脚本放在了/etc/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.
sh /home/ds/tsarixp/ip.sh
exit 0
~
~
~
~
~
~
~
~
-------------------------------------------------------
好像不能修改成功,同样的文件,放在同样的位置放在虚拟机下就可以修改成功,谁知道怎么回事啊?
|
|