@@ -58,16 +58,15 @@ impl<'a> NetworkInterface<'a> {
5858 #[ cfg( feature = "trace" ) ]
5959 let mut device = Tracer :: new ( device, |timestamp, printer| trace ! ( "{timestamp} {printer}" ) ) ;
6060
61- if hermit_var ! ( "HERMIT_IP" ) . is_some ( ) {
62- warn ! (
63- "A static IP address is specified with the environment variable HERMIT_IP, but the device is configured to use DHCPv4!"
64- ) ;
61+ if let Some ( hermit_ip) = hermit_var ! ( "HERMIT_IP" ) {
62+ warn ! ( "HERMIT_IP was set to {hermit_ip}, but Hermit was built with DHCPv4." ) ;
63+ warn ! ( "Ignoring HERMIT_IP." ) ;
6564 }
6665
6766 let ethernet_addr = EthernetAddress ( [ mac[ 0 ] , mac[ 1 ] , mac[ 2 ] , mac[ 3 ] , mac[ 4 ] , mac[ 5 ] ] ) ;
6867 let hardware_addr = HardwareAddress :: Ethernet ( ethernet_addr) ;
6968
70- info ! ( "MAC address {hardware_addr}" ) ;
69+ info ! ( "MAC address: {hardware_addr}" ) ;
7170 let capabilities = device. capabilities ( ) ;
7271 info ! ( "{:?}" , capabilities. checksum) ;
7372 info ! ( "MTU: {} bytes" , capabilities. max_transmission_unit) ;
@@ -132,12 +131,12 @@ impl<'a> NetworkInterface<'a> {
132131 let hardware_addr = HardwareAddress :: Ethernet ( ethernet_addr) ;
133132 let ip_addr = IpCidr :: from ( Ipv4Cidr :: from_netmask ( myip, mymask) . unwrap ( ) ) ;
134133
135- info ! ( "MAC address {hardware_addr}" ) ;
136- info ! ( "Configure network interface with address {ip_addr}" ) ;
137- info ! ( "Configure gateway with address {mygw}" ) ;
134+ info ! ( "MAC address: {hardware_addr}" ) ;
138135 let capabilities = device. capabilities ( ) ;
139136 info ! ( "{:?}" , capabilities. checksum) ;
140137 info ! ( "MTU: {} bytes" , capabilities. max_transmission_unit) ;
138+ info ! ( "IP address: {ip_addr}" ) ;
139+ info ! ( "Gateway: {mygw}" ) ;
141140
142141 // use the current time based on the wall-clock time as seed
143142 let mut config = Config :: new ( hardware_addr) ;
0 commit comments