Statistics
| Branch: | Tag: | Revision:

root / src / ganeti-kvmd.hs @ 0349f9c6

History | View | Annotate | Download (1.2 kB)

1 d6769989 Jose A. Lopes
{-| KVM daemon main
2 d6769989 Jose A. Lopes
3 d6769989 Jose A. Lopes
-}
4 d6769989 Jose A. Lopes
5 d6769989 Jose A. Lopes
{-
6 d6769989 Jose A. Lopes
7 d6769989 Jose A. Lopes
Copyright (C) 2013 Google Inc.
8 d6769989 Jose A. Lopes
9 d6769989 Jose A. Lopes
This program is free software; you can redistribute it and/or modify
10 d6769989 Jose A. Lopes
it under the terms of the GNU General Public License as published by
11 d6769989 Jose A. Lopes
the Free Software Foundation; either version 2 of the License, or
12 d6769989 Jose A. Lopes
(at your option) any later version.
13 d6769989 Jose A. Lopes
14 d6769989 Jose A. Lopes
This program is distributed in the hope that it will be useful, but
15 d6769989 Jose A. Lopes
WITHOUT ANY WARRANTY; without even the implied warranty of
16 d6769989 Jose A. Lopes
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 d6769989 Jose A. Lopes
General Public License for more details.
18 d6769989 Jose A. Lopes
19 d6769989 Jose A. Lopes
You should have received a copy of the GNU General Public License
20 d6769989 Jose A. Lopes
along with this program; if not, write to the Free Software
21 d6769989 Jose A. Lopes
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 d6769989 Jose A. Lopes
02110-1301, USA.
23 d6769989 Jose A. Lopes
24 d6769989 Jose A. Lopes
-}
25 d6769989 Jose A. Lopes
26 d6769989 Jose A. Lopes
import Ganeti.Daemon (OptType)
27 d6769989 Jose A. Lopes
import qualified Ganeti.Daemon as Daemon
28 d6769989 Jose A. Lopes
import qualified Ganeti.Kvmd as Kvmd (start)
29 d6769989 Jose A. Lopes
import Ganeti.Runtime (GanetiDaemon(..))
30 d6769989 Jose A. Lopes
31 d6769989 Jose A. Lopes
-- | Options list and functions.
32 d6769989 Jose A. Lopes
options :: [OptType]
33 d6769989 Jose A. Lopes
options =
34 d6769989 Jose A. Lopes
  [ Daemon.oNoDaemonize
35 d6769989 Jose A. Lopes
  , Daemon.oNoUserChecks
36 d6769989 Jose A. Lopes
  , Daemon.oDebug
37 d6769989 Jose A. Lopes
  , Daemon.oSyslogUsage
38 d6769989 Jose A. Lopes
  ]
39 d6769989 Jose A. Lopes
40 d6769989 Jose A. Lopes
-- | Main function.
41 d6769989 Jose A. Lopes
main :: IO ()
42 d6769989 Jose A. Lopes
main =
43 d6769989 Jose A. Lopes
  Daemon.genericMain GanetiKvmd options
44 d6769989 Jose A. Lopes
    (\_ -> return . Right $ ())
45 d6769989 Jose A. Lopes
    (\_ _ -> return ())
46 d6769989 Jose A. Lopes
    (\_ _ _ -> Kvmd.start)