Commit f81d41cc authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Replace import in 'Ganeti.Path'



Given that Haskell has its own generated 'AutoConf' module, it makes
sense that other Haskell modules import 'configure' variables directly
from 'AutoConf' instead of importing the Python to Haskell generated
constants.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 30277da3
......@@ -43,7 +43,7 @@ module Ganeti.Path
import System.FilePath
import System.Posix.Env (getEnvDefault)
import qualified Ganeti.Constants as C
import AutoConf
-- | Simple helper to concat two paths.
pjoin :: IO String -> String -> IO String
......@@ -64,7 +64,7 @@ addNodePrefix path = do
-- | Directory for data.
dataDir :: IO FilePath
dataDir = addNodePrefix $ C.autoconfLocalstatedir </> "lib" </> "ganeti"
dataDir = addNodePrefix $ AutoConf.localstatedir </> "lib" </> "ganeti"
-- | Helper for building on top of dataDir (internal).
dataDirP :: FilePath -> IO FilePath
......@@ -72,11 +72,11 @@ dataDirP = (dataDir `pjoin`)
-- | Directory for runtime files.
runDir :: IO FilePath
runDir = addNodePrefix $ C.autoconfLocalstatedir </> "run" </> "ganeti"
runDir = addNodePrefix $ AutoConf.localstatedir </> "run" </> "ganeti"
-- | Directory for log files.
logDir :: IO FilePath
logDir = addNodePrefix $ C.autoconfLocalstatedir </> "log" </> "ganeti"
logDir = addNodePrefix $ AutoConf.localstatedir </> "log" </> "ganeti"
-- | Directory for Unix sockets.
socketDir :: IO FilePath
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment