| {-| Build-time configuration for Ganeti. |
| |
| Note that this file is autogenerated by the Makefile with a header |
| from @AutoConf.hs.in@. |
| |
| -} |
| |
| {- |
| |
| Copyright (C) 2013 Google Inc. |
| All rights reserved. |
| |
| Redistribution and use in source and binary forms, with or without |
| modification, are permitted provided that the following conditions are |
| met: |
| |
| 1. Redistributions of source code must retain the above copyright notice, |
| this list of conditions and the following disclaimer. |
| |
| 2. Redistributions in binary form must reproduce the above copyright |
| notice, this list of conditions and the following disclaimer in the |
| documentation and/or other materials provided with the distribution. |
| |
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS |
| IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| |
| -} |
| |
| module AutoConf where |
| |
| split :: String -> [String] |
| split str = |
| case span (/= ',') str of |
| (x, []) -> [x] |
| (x, _:xs) -> x:split xs |
| |
| packageVersion :: String |
| packageVersion = "PACKAGE_VERSION" |
| |
| versionMajor :: Int |
| versionMajor = VERSION_MAJOR |
| |
| versionMinor :: Int |
| versionMinor = VERSION_MINOR |
| |
| versionRevision :: Int |
| versionRevision = VERSION_REVISION |
| |
| versionSuffix :: String |
| versionSuffix = "VERSION_SUFFIX" |
| |
| versionFull :: String |
| versionFull = "VERSION_FULL" |
| |
| dirVersion :: String |
| dirVersion = "DIRVERSION" |
| |
| localstatedir :: String |
| localstatedir = "LOCALSTATEDIR" |
| |
| sysconfdir :: String |
| sysconfdir = "SYSCONFDIR" |
| |
| sshConfigDir :: String |
| sshConfigDir = "SSH_CONFIG_DIR" |
| |
| sshLoginUser :: String |
| sshLoginUser = "SSH_LOGIN_USER" |
| |
| sshConsoleUser :: String |
| sshConsoleUser = "SSH_CONSOLE_USER" |
| |
| exportDir :: String |
| exportDir = "EXPORT_DIR" |
| |
| backupDir :: String |
| backupDir = "BACKUP_DIR" |
| |
| osSearchPath :: [String] |
| osSearchPath = split OS_SEARCH_PATH |
| |
| esSearchPath :: [String] |
| esSearchPath = split ES_SEARCH_PATH |
| |
| xenBootloader :: String |
| xenBootloader = "XEN_BOOTLOADER" |
| |
| xenConfigDir :: String |
| xenConfigDir = "XEN_CONFIG_DIR" |
| |
| xenKernel :: String |
| xenKernel = "XEN_KERNEL" |
| |
| xenInitrd :: String |
| xenInitrd = "XEN_INITRD" |
| |
| kvmKernel :: String |
| kvmKernel = "KVM_KERNEL" |
| |
| sharedFileStorageDir :: String |
| sharedFileStorageDir = "SHARED_FILE_STORAGE_DIR" |
| |
| iallocatorSearchPath :: [String] |
| iallocatorSearchPath = split IALLOCATOR_SEARCH_PATH |
| |
| kvmPath :: String |
| kvmPath = "KVM_PATH" |
| |
| ipPath :: String |
| ipPath = "IP_PATH" |
| |
| socatPath :: String |
| socatPath = "SOCAT_PATH" |
| |
| socatUseEscape :: Bool |
| socatUseEscape = SOCAT_USE_ESCAPE |
| |
| socatUseCompress :: Bool |
| socatUseCompress = SOCAT_USE_COMPRESS |
| |
| lvmStripecount :: Int |
| lvmStripecount = LVM_STRIPECOUNT |
| |
| toolsdir :: String |
| toolsdir = "TOOLSDIR" |
| |
| gntScripts :: [String] |
| gntScripts = GNT_SCRIPTS[] |
| |
| htoolsProgs :: [String] |
| htoolsProgs = HS_HTOOLS_PROGS[] |
| |
| pkglibdir :: String |
| pkglibdir = "PKGLIBDIR" |
| |
| sharedir :: String |
| sharedir = "SHAREDIR" |
| |
| versionedsharedir :: String |
| versionedsharedir = "VERSIONEDSHAREDIR" |
| |
| drbdBarriers :: String |
| drbdBarriers = "DRBD_BARRIERS" |
| |
| drbdNoMetaFlush :: Bool |
| drbdNoMetaFlush = DRBD_NO_META_FLUSH |
| |
| syslogUsage :: String |
| syslogUsage = "SYSLOG_USAGE" |
| |
| daemonsGroup :: String |
| daemonsGroup = "DAEMONS_GROUP" |
| |
| adminGroup :: String |
| adminGroup = "ADMIN_GROUP" |
| |
| masterdUser :: String |
| masterdUser = "MASTERD_USER" |
| |
| masterdGroup :: String |
| masterdGroup = "MASTERD_GROUP" |
| |
| rapiUser :: String |
| rapiUser = "RAPI_USER" |
| |
| rapiGroup :: String |
| rapiGroup = "RAPI_GROUP" |
| |
| confdUser :: String |
| confdUser = "CONFD_USER" |
| |
| confdGroup :: String |
| confdGroup = "CONFD_GROUP" |
| |
| luxidUser :: String |
| luxidUser = "LUXID_USER" |
| |
| luxidGroup :: String |
| luxidGroup = "LUXID_GROUP" |
| |
| nodedUser :: String |
| nodedUser = "NODED_USER" |
| |
| nodedGroup :: String |
| nodedGroup = "NODED_GROUP" |
| |
| mondUser :: String |
| mondUser = "MOND_USER" |
| |
| mondGroup :: String |
| mondGroup = "MOND_GROUP" |
| |
| diskSeparator :: String |
| diskSeparator = "DISK_SEPARATOR" |
| |
| qemuimgPath :: String |
| qemuimgPath = "QEMUIMG_PATH" |
| |
| htools :: Bool |
| htools = True |
| |
| enableConfd :: Bool |
| enableConfd = ENABLE_CONFD |
| |
| xenCmd :: String |
| xenCmd = "XEN_CMD" |
| |
| enableSplitQuery :: Bool |
| enableSplitQuery = ENABLE_SPLIT_QUERY |
| |
| enableRestrictedCommands :: Bool |
| enableRestrictedCommands = ENABLE_RESTRICTED_COMMANDS |
| |
| enableMond :: Bool |
| enableMond = ENABLE_MOND |
| |
| hasGnuLn :: Bool |
| hasGnuLn = HAS_GNU_LN |
| |
| -- Write dictionary with man page name as the key and the section |
| -- number as the value |
| manPages :: [(String, Int)] |
| manPages = MAN_PAGES[] |
| |
| pyAfInet4 :: Int |
| pyAfInet4 = AF_INET4 |
| |
| pyAfInet6 :: Int |
| pyAfInet6 = AF_INET6 |