2022-02-06 22:06:55 +00:00
|
|
|
<require-service <daemon interface-monitor>>
|
|
|
|
|
|
|
|
<require-service <milestone network>>
|
|
|
|
<depends-on <milestone network> <service-state <daemon interface-monitor> ready>>
|
|
|
|
|
|
|
|
<configure-interface "lo" <static "127.0.0.1">>
|
|
|
|
|
|
|
|
? <configure-interface ?ifname <static ?ipaddr>> [
|
|
|
|
! <run-oneshot ["ifconfig" $ifname $ipaddr "up"]>
|
|
|
|
?- ! <run-oneshot ["ifconfig" $ifname "down"] never>
|
|
|
|
]
|
|
|
|
|
|
|
|
? <configure-interface ?ifname <dhcp>> [
|
|
|
|
! <run-oneshot ["ifconfig" $ifname "up"]>
|
|
|
|
?- ! <run-oneshot ["ifconfig" $ifname "down"] never>
|
|
|
|
<require-service <daemon <udhcpc $ifname>>>
|
|
|
|
]
|
|
|
|
|
|
|
|
? <run-service <daemon <udhcpc ?ifname>>> [
|
2022-02-07 14:30:59 +00:00
|
|
|
<daemon <udhcpc $ifname> ["udhcpc" "-i" $ifname "-fR" "-s" "/usr/lib/synit/udhcpc.script"]>
|
|
|
|
]
|
|
|
|
|
2022-02-06 22:06:55 +00:00
|
|
|
<daemon interface-monitor {
|
|
|
|
argv: "/usr/lib/synit/interface-monitor"
|
|
|
|
protocol: application/syndicate
|
|
|
|
}>
|
|
|
|
|
|
|
|
? <machine-dataspace ?machine> [
|
|
|
|
? <service-object <daemon interface-monitor> ?cap> [
|
|
|
|
$cap {
|
|
|
|
machine: $machine
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
$machine ? <interface ?ifname _ normal _ _ carrier _> [
|
|
|
|
$config <configure-interface $ifname <dhcp>>
|
|
|
|
]
|
2022-02-07 13:34:18 +00:00
|
|
|
|
|
|
|
$machine ? <route ?af default _ _ _ _> [
|
|
|
|
$config <default-route $af>
|
|
|
|
]
|
2022-02-06 22:06:55 +00:00
|
|
|
]
|