# network — Bring up loopback, physical interfaces, routes (BSD-pivot v2)
#
# Reads /etc/hostname.<if> for each physical interface (line-oriented
# format documented in start.sh) and /etc/defaultrouter for static
# default routes. DHCP is handled via `ifconfig <if> dhcp start`, which
# forks /sbin/dhcpagent directly.
#
# Requires both dlmgmtd and ipmgmtd: modern illumos `ifconfig <link> plumb`
# resolves link names through dlmgmtd, and `ifconfig <link> inet ADDR up`
# goes through libipadm → ipmgmtd. `dladm init-phys` (in start.sh)
# registers physical links with dlmgmtd at boot.
#
# Replaces the v1 SMF stack (network/loopback, network/physical,
# network/initial, network/netmask, network/service, network/routing-setup)
# with a single oneshot. inetd / fmd / rpcbind remain dropped.

[service]
name = "network"
description = "Bring up network interfaces and routes (BSD-style)"
type = "oneshot"

[exec]
start = "/etc/zyginit/services/network/start.sh"
stop = "/etc/zyginit/services/network/stop.sh"

[dependencies]
requires = ["identity", "dlmgmtd", "ipmgmtd"]

[restart]
on = "never"
