diff options
| author | Joey Hess <joey@kitenet.net> | 2014-03-30 01:17:19 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-03-30 01:17:19 -0400 |
| commit | 3940f2cbde7a7ca220be932abb58f1c1a99c9b26 (patch) | |
| tree | 0b4b31ce29161e1adcfdb1087b5dfd08bb9f7691 /Utility | |
| parent | 8684db8bbf886d5dc41523e2b79df54aa1702cf8 (diff) | |
use fqdn
Diffstat (limited to 'Utility')
| -rw-r--r-- | Utility/Network.hs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Utility/Network.hs b/Utility/Network.hs deleted file mode 100644 index 62523c9e..00000000 --- a/Utility/Network.hs +++ /dev/null @@ -1,21 +0,0 @@ -{- network functions - - - - Copyright 2012 Joey Hess <joey@kitenet.net> - - - - Licensed under the GNU GPL version 3 or higher. - -} - -module Utility.Network where - -import Utility.Process -import Utility.Exception - -import Control.Applicative - -{- Haskell lacks uname(2) bindings, except in the - - Bindings.Uname addon. Rather than depend on that, - - use uname -n when available. -} -getHostname :: IO (Maybe String) -getHostname = catchMaybeIO uname_node - where - uname_node = takeWhile (/= '\n') <$> readProcess "uname" ["-n"] |
