1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

configure: detect /run dir

Access /run directly when system supports it.
This commit is contained in:
Zdenek Kabelac 2015-05-02 23:57:52 +02:00
parent 636bcb020a
commit bc52f07a8f
3 changed files with 24 additions and 13 deletions

View File

@ -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

18
configure vendored
View File

@ -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

View File

@ -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.])