Zynq BusyBox 中DHCP 获取 IP 流程 参考开机|vinit 启动运行级别 rc5|v执行 /etc/rc5.d/S01networking|v调用 /etc/init.d/networking start|vnetworking 脚本执行ifup-a|vifup读取 /etc/network/interfaces|v发现配置 auto eth0 iface eth0 inet dhcp|v启动 DHCP 客户端(udhcpc)|vDHCP服务器响应|veth0 获取 IP 地址/etc/init.d/networking#!/bin/sh -e### BEGIN INIT INFO# Provides: networking# Required-Start: mountvirtfs $local_fs# Required-Stop: $local_fs# Should-Start: ifupdown# Should-Stop: ifupdown# Default-Start: S# Default-Stop: 0 6# Short-Description: Raise network interfaces.### END INIT INFOPATH/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin[-x/sbin/ifup]||exit0check_network_file_systems(){[-e/proc/mounts]||return0if[-e/etc/iscsi/iscsi.initramfs];thenechonot deconfiguring network interfaces: iSCSI root is mounted.exit0fiexec90/proc/mountswhilereadDEV MTPT FSTYPE REST;docase$DEVin/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)echonot deconfiguring network interfaces: network devices still mounted.exit0;;esaccase$FSTYPEinnfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)echonot deconfiguring network interfaces: network file systems still mounted.exit0;;esacdoneexec099-}check_network_swap(){[-e/proc/swaps]||return0exec90/proc/swapswhilereadDEV MTPT FSTYPE REST;docase$DEVin/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)echonot deconfiguring network interfaces: network swap still mounted.exit0;;esacdoneexec099-}case$1instart)echo-nConfiguring network interfaces... sysctl-e-p/etc/sysctl.conf/dev/null21ifup-aechodone.;;stop)check_network_file_systems check_network_swapecho-nDeconfiguring network interfaces... ifdown-aechodone.;;force-reload|restart)echoRunning$0$1is deprecated because it may not enable again some interfacesechoReconfiguring network interfaces... ifdown-a||trueifup-aechodone.;;*)echoUsage: /etc/init.d/networking {start|stop}exit1;;esacexit0/etc/network/interfaces# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)# The loopback interfaceauto lo iface lo inet loopback# Wireless interfaces# Wired or wireless interfacesauto eth0 iface eth0 inet dhcp# Ethernet/RNDIS gadget (g_ether)# ... or on host side, usbnet and random hwaddr