summaryrefslogtreecommitdiff
path: root/Property/Hostname.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Property/Hostname.hs')
-rw-r--r--Property/Hostname.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Property/Hostname.hs b/Property/Hostname.hs
new file mode 100644
index 00000000..b4c28a2b
--- /dev/null
+++ b/Property/Hostname.hs
@@ -0,0 +1,15 @@
+module Property.Hostname where
+
+import Data.List
+import System.Posix
+import Control.Applicative
+import Data.Maybe
+
+import Property
+import Utility.SafeCommand
+import Utility.Exception
+
+type HostName = String
+
+set :: HostName -> Property
+set hostname = fileHasContent "/etc/hostname" [hostname]