Statistics
| Branch: | Tag: | Revision:

root / src / AutoConf.hs.in @ fa70fff2

History | View | Annotate | Download (4.3 kB)

1
{-| Build-time configuration for Ganeti.
2

    
3
Note that this file is autogenerated by the Makefile with a header
4
from @AutoConf.hs.in@.
5

    
6
-}
7

    
8
{-
9

    
10
Copyright (C) 2013 Google Inc.
11

    
12
This program is free software; you can redistribute it and/or modify
13
it under the terms of the GNU General Public License as published by
14
the Free Software Foundation; either version 2 of the License, or
15
(at your option) any later version.
16

    
17
This program is distributed in the hope that it will be useful, but
18
WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20
General Public License for more details.
21

    
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25
02110-1301, USA.
26

    
27
-}
28

    
29
module AutoConf where
30

    
31
packageVersion :: String
32
packageVersion = "PACKAGE_VERSION"
33

    
34
versionMajor :: Int
35
versionMajor = VERSION_MAJOR
36

    
37
versionMinor :: Int
38
versionMinor = VERSION_MINOR
39

    
40
versionRevision :: Int
41
versionRevision = VERSION_REVISION
42

    
43
versionSuffix :: String
44
versionSuffix = "VERSION_SUFFIX"
45

    
46
versionFull :: String
47
versionFull = "VERSION_FULL"
48

    
49
localstatedir :: String
50
localstatedir = "LOCALSTATEDIR"
51

    
52
sysconfdir :: String
53
sysconfdir = "SYSCONFDIR"
54

    
55
sshConfigDir :: String
56
sshConfigDir = "SSH_CONFIG_DIR"
57

    
58
sshLoginUser :: String
59
sshLoginUser = "SSH_LOGIN_USER"
60

    
61
sshConsoleUser :: String
62
sshConsoleUser = "SSH_CONSOLE_USER"
63

    
64
exportDir :: String
65
exportDir = "EXPORT_DIR"
66

    
67
osSearchPath :: [String]
68
osSearchPath = OS_SEARCH_PATH[]
69

    
70
esSearchPath :: [String]
71
esSearchPath = ES_SEARCH_PATH[]
72

    
73
xenBootloader :: String
74
xenBootloader = "XEN_BOOTLOADER"
75

    
76
xenConfigDir :: String
77
xenConfigDir = "XEN_CONFIG_DIR"
78

    
79
xenKernel :: String
80
xenKernel = "XEN_KERNEL"
81

    
82
xenInitrd :: String
83
xenInitrd = "XEN_INITRD"
84

    
85
kvmKernel :: String
86
kvmKernel = "KVM_KERNEL"
87

    
88
sharedFileStorageDir :: String
89
sharedFileStorageDir = "SHARED_FILE_STORAGE_DIR"
90

    
91
iallocatorSearchPath :: [String]
92
iallocatorSearchPath = IALLOCATOR_SEARCH_PATH[]
93

    
94
kvmPath :: String
95
kvmPath = "KVM_PATH"
96

    
97
ipPath :: String
98
ipPath = "IP_PATH"
99

    
100
socatPath :: String
101
socatPath = "SOCAT"
102

    
103
socatUseEscape :: Bool
104
socatUseEscape = SOCAT_USE_ESCAPE
105

    
106
socatUseCompress :: Bool
107
socatUseCompress = SOCAT_USE_COMPRESS
108

    
109
lvmStripecount :: Int
110
lvmStripecount = LVM_STRIPECOUNT
111

    
112
toolsdir :: String
113
toolsdir = "TOOLSDIR"
114

    
115
gntScripts :: [String]
116
gntScripts = GNT_SCRIPTS[]
117

    
118
htoolsProgs :: [String]
119
htoolsProgs = HS_HTOOLS_PROGS[]
120

    
121
pkglibdir :: String
122
pkglibdir = "PKGLIBDIR"
123

    
124
drbdBarriers :: String
125
drbdBarriers = "DRBD_BARRIERS"
126

    
127
drbdNoMetaFlush :: Bool
128
drbdNoMetaFlush = DRBD_NO_META_FLUSH
129

    
130
data SyslogUsageT
131
  = SyslogNo
132
  | SyslogYes
133
  | SyslogOnly
134
  deriving (Bounded, Enum)
135

    
136
instance Read SyslogUsageT where
137
  readsPrec _ r = do
138
    (s, r') <- lex r
139
    case s of
140
      "no" -> [(SyslogNo, r')]
141
      "yes" -> [(SyslogYes, r')]
142
      "only" -> [(SyslogOnly, r')]
143
      _ -> []
144

    
145
instance Show SyslogUsageT where
146
  show SyslogNo = "no"
147
  show SyslogYes = "yes"
148
  show SyslogOnly = "only"
149

    
150
syslogUsage :: SyslogUsageT
151
syslogUsage = read "SYSLOG_USAGE" :: SyslogUsageT
152

    
153
daemonsGroup :: String
154
daemonsGroup = "DAEMONS_GROUP"
155

    
156
adminGroup :: String
157
adminGroup = "ADMIN_GROUP"
158

    
159
masterdUser :: String
160
masterdUser = "MASTERD_USER"
161

    
162
masterdGroup :: String
163
masterdGroup = "MASTERD_GROUP"
164

    
165
rapiUser :: String
166
rapiUser = "RAPI_USER"
167

    
168
rapiGroup :: String
169
rapiGroup = "RAPI_GROUP"
170

    
171
confdUser :: String
172
confdUser = "CONFD_USER"
173

    
174
confdGroup :: String
175
confdGroup = "CONFD_GROUP"
176

    
177
luxidUser :: String
178
luxidUser = "LUXID_USER"
179

    
180
luxidGroup :: String
181
luxidGroup = "LUXID_GROUP"
182

    
183
nodedUser :: String
184
nodedUser = "NODED_USER"
185

    
186
nodedGroup :: String
187
nodedGroup = "NODED_GROUP"
188

    
189
mondUser :: String
190
mondUser = "MOND_USER"
191

    
192
mondGroup :: String
193
mondGroup = "MOND_GROUP"
194

    
195
diskSeparator :: String
196
diskSeparator = "DISK_SEPARATOR"
197

    
198
qemuimgPath :: String
199
qemuimgPath = "QEMUIMG_PATH"
200

    
201
htools :: Bool
202
htools = True
203

    
204
enableConfd :: Bool
205
enableConfd = ENABLE_CONFD
206

    
207
xenCmd :: String
208
xenCmd = "XEN_CMD"
209

    
210
enableSplitQuery :: Bool
211
enableSplitQuery = ENABLE_SPLIT_QUERY
212

    
213
enableRestrictedCommands :: Bool
214
enableRestrictedCommands = ENABLE_RESTRICTED_COMMANDS
215

    
216
enableMond :: Bool
217
enableMond = ENABLE_MOND
218

    
219
-- Write dictionary with man page name as the key and the section
220
-- number as the value
221
manPages :: [(String, Int)]
222
manPages = MAN_PAGES[]