summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-05-02 23:57:52 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-05-03 00:42:07 +0200
commitbc52f07a8fe0d7a9aa4c0b2fd63109cbd06288b5 (patch)
tree185ea17d5d7e244e66a798f1efec14a3cd7ef29a /configure.in
parent636bcb020ac54ff26e48592f33cbb7853a24e3e6 (diff)
downloadlvm2-bc52f07a8fe0d7a9aa4c0b2fd63109cbd06288b5.tar.gz
configure: detect /run dir
Access /run directly when system supports it.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 38c7b5190..a14540f41 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
###############################################################################
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 2004-2014 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
@@ -645,28 +645,32 @@ pkg_config_init() {
}
################################################################################
+AC_MSG_CHECKING(for default run directory)
+RUN_DIR="/run"
+test -d "/run" || RUN_DIR="/var/run"
+AC_MSG_RESULT($RUN_DIR)
dnl -- Set up pidfile and run directory
AH_TEMPLATE(DEFAULT_PID_DIR)
AC_ARG_WITH(default-pid-dir,
AC_HELP_STRING([--with-default-pid-dir=PID_DIR],
- [Default directory to keep PID files in. [/var/run]]),
- DEFAULT_PID_DIR="$withval", DEFAULT_PID_DIR="/var/run")
+ [Default directory to keep PID files in. [autodetect]]),
+ DEFAULT_PID_DIR="$withval", DEFAULT_PID_DIR=$RUN_DIR)
AC_DEFINE_UNQUOTED(DEFAULT_PID_DIR, ["$DEFAULT_PID_DIR"],
[Default directory to keep PID files in.])
AH_TEMPLATE(DEFAULT_DM_RUN_DIR, [Name of default DM run directory.])
AC_ARG_WITH(default-dm-run-dir,
AC_HELP_STRING([--with-default-dm-run-dir=DM_RUN_DIR],
- [ Default DM run directory. [/var/run]]),
- DEFAULT_DM_RUN_DIR="$withval", DEFAULT_DM_RUN_DIR="/var/run")
+ [ Default DM run directory. [autodetect]]),
+ DEFAULT_DM_RUN_DIR="$withval", DEFAULT_DM_RUN_DIR=$RUN_DIR)
AC_DEFINE_UNQUOTED(DEFAULT_DM_RUN_DIR, ["$DEFAULT_DM_RUN_DIR"],
[Default DM run directory.])
AH_TEMPLATE(DEFAULT_RUN_DIR, [Name of default LVM run directory.])
AC_ARG_WITH(default-run-dir,
AC_HELP_STRING([--with-default-run-dir=RUN_DIR],
- [Default LVM run directory. [/var/run/lvm]]),
- DEFAULT_RUN_DIR="$withval", DEFAULT_RUN_DIR="/var/run/lvm")
+ [Default LVM run directory. [autodetect_run_dir/lvm]]),
+ DEFAULT_RUN_DIR="$withval", DEFAULT_RUN_DIR="$RUN_DIR/lvm")
AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR, ["$DEFAULT_RUN_DIR"],
[Default LVM run directory.])