Revision 814e1e23 htools/htools.hs
b/htools/htools.hs | ||
---|---|---|
32 | 32 |
import System.IO |
33 | 33 |
import System.IO.Error (isDoesNotExistError) |
34 | 34 |
|
35 |
import Ganeti.Utils
|
|
35 |
import Ganeti.Common (formatCommands)
|
|
36 | 36 |
import Ganeti.HTools.CLI (parseOpts, genericOpts) |
37 | 37 |
import Ganeti.HTools.Program (personalities) |
38 |
import Ganeti.Utils |
|
38 | 39 |
|
39 | 40 |
-- | Display usage and exit. |
40 | 41 |
usage :: String -> IO () |
... | ... | |
42 | 43 |
hPutStrLn stderr $ "Unrecognised personality '" ++ name ++ "'." |
43 | 44 |
hPutStrLn stderr "This program must be installed under one of the following\ |
44 | 45 |
\ names:" |
45 |
mapM_ (hPutStrLn stderr . (" - " ++) . fst) personalities
|
|
46 |
hPutStrLn stderr . unlines $ formatCommands personalities
|
|
46 | 47 |
exitErr "Please either rename/symlink the program or set\n\ |
47 | 48 |
\the environment variable HTOOLS to the desired role." |
48 | 49 |
|
Also available in: Unified diff