diff --git a/.gitignore b/.gitignore index a2ef1c0dd78236dc7bff2e44d3ebb9928b89a0ce..fa3b3d73bf957306d254245ea197ea4a333bbe0b 100644 --- a/.gitignore +++ b/.gitignore @@ -98,7 +98,6 @@ /htools/.hpc /htools/coverage -/htools/hbal /htools/hscan /htools/hspace /htools/htools diff --git a/Makefile.am b/Makefile.am index 9c7a33a5567e144cbfc7dff8017f2327b8bf95b2..c60eccc5970ee00fe58968b2640f6867ef58c741 100644 --- a/Makefile.am +++ b/Makefile.am @@ -307,10 +307,10 @@ docrst = \ doc/walkthrough.rst HS_PROGS = \ - htools/hbal \ htools/hscan \ htools/hspace \ htools/htools +HS_BIN_ROLES = hbal HS_ALL_PROGS = $(HS_PROGS) htools/test HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS)) @@ -343,6 +343,7 @@ HS_LIB_SRCS = \ htools/Ganeti/HTools/Types.hs \ htools/Ganeti/HTools/Utils.hs \ htools/Ganeti/HTools/Program/Hail.hs \ + htools/Ganeti/HTools/Program/Hbal.hs \ htools/Ganeti/Jobs.hs \ htools/Ganeti/Luxi.hs \ htools/Ganeti/OpCodes.hs @@ -455,6 +456,10 @@ install-exec-hook: @mkdir_p@ $(DESTDIR)$(iallocatorsdir) $(LN_S) -f $(DESTDIR)$(bindir)/htools \ $(DESTDIR)$(iallocatorsdir)/hail + for role in $(HS_BIN_ROLES); do \ + $(LN_S) -f $(DESTDIR)$(bindir)/htools \ + $(DESTDIR)$(bindir)/$$role ; \ + done endif $(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile diff --git a/htools/hbal.hs b/htools/Ganeti/HTools/Program/Hbal.hs similarity index 99% rename from htools/hbal.hs rename to htools/Ganeti/HTools/Program/Hbal.hs index 432dfe32c2e96a079d5973515a91305cbd2b67c6..63048f0944bcea042de42332c192392760f0a51b 100644 --- a/htools/hbal.hs +++ b/htools/Ganeti/HTools/Program/Hbal.hs @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -} -module Main (main) where +module Ganeti.HTools.Program.Hbal (main) where import Control.Concurrent (threadDelay) import Control.Exception (bracket) diff --git a/htools/htools.hs b/htools/htools.hs index 527e409f0cfb68fa4ccca59f7bf69a232130d4dc..a2c2b482899e3ff2fa7c8ee490448782c03eaa12 100644 --- a/htools/htools.hs +++ b/htools/htools.hs @@ -31,10 +31,12 @@ import System.IO import Ganeti.HTools.Utils import qualified Ganeti.HTools.Program.Hail as Hail +import qualified Ganeti.HTools.Program.Hbal as Hbal -- | Supported binaries. personalities :: [(String, IO ())] personalities = [ ("hail", Hail.main) + , ("hbal", Hbal.main) ] -- | Display usage and exit.