【问题标题】:Configuring Static IP Address for Tizen OS [closed]为 Tizen OS 配置静态 IP 地址 [关闭]
【发布时间】:2014-02-24 05:28:18
【问题描述】:

我是 Tizen 操作系统的新手,我们有一台安装了 Tizen 的构建机器,我需要配置静态 IP 地址。我的机器上没有安装 ConnMan Tools。我浏览了仅使用 ConnMan 工具提及的每个博客上的博客数量。有没有办法像我们在 Fedora 或 Solaris 中那样通过更新networking-scripts 文件夹下的脚本文件来使用命令行配置IP 地址。

【问题讨论】:

    标签: tizen static-ip-address systemd


    【解决方案1】:

    试试这个(记得设置正确的IP和MAC):

    1) 创建文件 '/etc/init.d/eth0' 并为其设置执行权限(555 即可):

    #!/bin/sh
    
    HWADDR='fe:fe:fe:fe:xx:xx'
    IP='10.10.xx.xxx'
    NETMASK='255.255.255.0'
    
    ifconfig eth0 hw ether $HWADDR
    ifconfig eth0 $IP netmask $NETMASK up
    

    2) 创建文件'/usr/lib/systemd/system/eth0-setup.service':

    [Unit]
    Description=Configure MAC on eth0 interface
    DefaultDependencies=no
    Before=net-config.service
    
    [Service]
    Type=simple
    ExecStart=/etc/init.d/eth0
    
    [Install]
    WantedBy=network.target
    

    3) 验证:运行第一个脚本并查看 eth0 是否已启动并根据需要运行。重启看看是否在开机时配置好了。

    【讨论】:

      猜你喜欢
      • 2016-03-31
      • 2012-11-28
      • 2020-04-26
      • 2010-10-10
      • 2022-11-22
      • 2014-10-01
      • 2016-03-18
      • 1970-01-01
      • 2021-10-15
      相关资源
      最近更新 更多