<!--
     Sample policy file for network-nanny.

     This will configure any Ethernet device in your system.

     You need to take these steps to enable this policy:

	     wicked nanny enable eth0
	     wicked nanny addpolicy samples/nanny/eth_all.xml

     This will automatically configure the interface when the
     link is up, and bring it down as you lose the link.

     Caveat: at this stage of development, you still need to be root
     to do these things.

  -->

<policy name="eth_all">
 <match>
   <link-type>ethernet</link-type>
   <minimum-device-state>link-up</minimum-device-state>
 </match>

 <merge final="true">
   <!--
	You can use this to configure specific address conf mechanisms.
	For instance, here we enable DHCP by default for all Ethernet
	interfaces.

	In this action, we merge all of the <ipv4:dhcp> element into the
	interface description unless that element exists already. In other
	words, this is an all-or-nothing approach. IF your interface
	configuration has an <ipv4:dhcp> element already, we do not change
	it; if it doesn't specify one at all, we use the one from this
	policy.
     -->
   <ipv4:dhcp>
     <enabled>true</enabled>

     <!-- Here, you can request a specific priority for all routes
          installed through DHCP. With this, you can install one policy
	  for your Ethernet device, and one for your WLAN device - and
	  if both are up, routes through the Ethernet device will be
	  given a higher priority than the (slower) WLAN routes.
       -->
     <route-priority>1</route-priority>

     <!-- if you need to set a specified client-id, or wish to request
          a different lease timeout, you can do this here. -->
   </ipv4:dhcp>
 </merge>

</policy>
