diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-05-02 23:57:52 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-05-03 00:42:07 +0200 |
commit | bc52f07a8fe0d7a9aa4c0b2fd63109cbd06288b5 (patch) | |
tree | 185ea17d5d7e244e66a798f1efec14a3cd7ef29a | |
parent | 636bcb020ac54ff26e48592f33cbb7853a24e3e6 (diff) | |
download | lvm2-bc52f07a8fe0d7a9aa4c0b2fd63109cbd06288b5.tar.gz |
configure: detect /run dir
Access /run directly when system supports it.
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.in | 18 |
3 files changed, 24 insertions, 13 deletions
@@ -1,5 +1,6 @@ Version 2.02.120 - =============================== + Configure detects /run or /var/run. Add missing newline in clvmd --help output. Version 2.02.119 - 2nd May 2015 @@ -1698,11 +1698,11 @@ Optional Packages: --with-ocfdir=DIR install OCF files in [PREFIX/lib/ocf/resource.d/lvm2] --with-default-pid-dir=PID_DIR - Default directory to keep PID files in. [/var/run] + Default directory to keep PID files in. [autodetect] --with-default-dm-run-dir=DM_RUN_DIR - Default DM run directory. [/var/run] + Default DM run directory. [autodetect] --with-default-run-dir=RUN_DIR - Default LVM run directory. [/var/run/lvm] + Default LVM run directory. [autodetect_run_dir/lvm] --with-clvmd=TYPE build cluster LVM Daemon The following cluster manager combinations are valid: * cman (RHEL5 or equivalent) @@ -8951,13 +8951,19 @@ fi } ################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default run directory" >&5 +$as_echo_n "checking for default run directory... " >&6; } +RUN_DIR="/run" +test -d "/run" || RUN_DIR="/var/run" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUN_DIR" >&5 +$as_echo "$RUN_DIR" >&6; } # Check whether --with-default-pid-dir was given. if test "${with_default_pid_dir+set}" = set; then : withval=$with_default_pid_dir; DEFAULT_PID_DIR="$withval" else - DEFAULT_PID_DIR="/var/run" + DEFAULT_PID_DIR=$RUN_DIR fi @@ -8972,7 +8978,7 @@ _ACEOF if test "${with_default_dm_run_dir+set}" = set; then : withval=$with_default_dm_run_dir; DEFAULT_DM_RUN_DIR="$withval" else - DEFAULT_DM_RUN_DIR="/var/run" + DEFAULT_DM_RUN_DIR=$RUN_DIR fi @@ -8987,7 +8993,7 @@ _ACEOF if test "${with_default_run_dir+set}" = set; then : withval=$with_default_run_dir; DEFAULT_RUN_DIR="$withval" else - DEFAULT_RUN_DIR="/var/run/lvm" + DEFAULT_RUN_DIR="$RUN_DIR/lvm" fi 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.]) |