diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-08-12 17:00:03 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-08-12 17:00:03 -0400 |
| commit | 4cab90c13713025a66c4aec7074730faa2e2b4ed (patch) | |
| tree | 9a0b4bfb04ceb1d56e7f43f8252132266a098c1c /src/Propellor/Property/Network.hs | |
| parent | b64a91db5767e2afcd53f496ba303ada8e3fdcc1 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/Network.hs')
| -rw-r--r-- | src/Propellor/Property/Network.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Propellor/Property/Network.hs b/src/Propellor/Property/Network.hs index 4d7ccffb..e01edb62 100644 --- a/src/Propellor/Property/Network.hs +++ b/src/Propellor/Property/Network.hs @@ -27,6 +27,15 @@ cleanInterfacesFile = hasContent interfacesFile ] `describe` ("clean " ++ interfacesFile) +-- | Configures an interface to get its address via dhcp. +dhcp :: Interface -> Property NoInfo +dhcp iface = hasContent (interfaceDFile iface) + [ "auto " ++ iface + , "iface " ++ iface ++ " inet dhcp" + ] + `describe` ("dhcp " ++ iface) + `requires` interfacesDEnabled + -- | Writes a static interface file for the specified interface. -- -- The interface has to be up already. It could have been brought up by |
