2014-03-30 03:45:48 +00:00
|
|
|
module Property.Hostname where
|
|
|
|
|
|
|
|
import Property
|
2014-03-30 04:28:56 +00:00
|
|
|
import Utility.SafeCommand
|
2014-03-30 03:45:48 +00:00
|
|
|
|
|
|
|
type HostName = String
|
|
|
|
|
|
|
|
set :: HostName -> Property
|
2014-03-30 04:28:56 +00:00
|
|
|
set hostname = combineProperties ("hostname " ++ hostname)
|
|
|
|
[ fileHasContent "/etc/hostname" [hostname]
|
|
|
|
, cmdProperty "hostname" [Param hostname]
|
|
|
|
]
|