| ネットワーク設定 | |||||||
| 永続化したうえで | |||||||
| cd /opt | |||||||
| #!/bin/sh>eth0.sh | |||||||
| pkill udhcpc>>eth0.sh | |||||||
| echo ifconfig eth0 IP アドレス netmask マスク broadcast ブロードキャスト up> >eth0.sh | |||||||
| route add default gw デフォルトゲートウェイ >>eth0.sh | |||||||
| echo nameserver DNS サーバ > /etc/resolv.conf | |||||||
| echo sh /opt/eth0.sh >>bootlocal.sh | |||||||
| sudo chmod 775 eth0.sh | |||||||
| sudo chown root:staff eth0.sh | |||||||
| 例 (eth0.sh) | |||||||
| #!/bin/sh | |||||||
| pkill ud hcpc | |||||||
| ifconfig eth0 192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255 up | |||||||
| route ad d default gw 192.168.0.1 | |||||||