[Ocfs2-tools-commits] jlbec commits r1377 - branches/cman-based
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Aug 13 17:43:12 PDT 2007
Author: jlbec
Date: 2007-08-13 17:43:11 -0700 (Mon, 13 Aug 2007)
New Revision: 1377
Modified:
branches/cman-based/configure.in
Log:
Test for a umount new enough to call umount.ocfs2. This is util-linux 2.12j
or newer.
Modified: branches/cman-based/configure.in
===================================================================
--- branches/cman-based/configure.in 2007-08-11 00:25:46 UTC (rev 1376)
+++ branches/cman-based/configure.in 2007-08-14 00:43:11 UTC (rev 1377)
@@ -179,6 +179,34 @@
[AC_MSG_WARN([libcman.h not found, cman support will not be built])])],
[AC_MSG_WARN([libcman not found, cman support will not be built])])
+umount_newp()
+{
+ NEEDVER="2.12j"
+ FOUNDVER="`/bin/umount -V | awk '
+ /util-linux/{sub(/\)$/, "", $3); print $3}
+ /mount-/{sub(/^.*mount-/, ""); print}'`"
+
+ test "x$FOUNDVER" = "x" && return 1
+ test "x$FOUNDVER" = "x$NEEDVER" && return 0
+
+ # If we don't have exactly NEEDVER, we better sort to something better.
+ RESVER="`(echo "$NEEDVER"; echo "$FOUNDVER") | sort -n | tail -1`"
+ if test "x$RESVER" = "x$NEEDVER"; then
+ return 1
+ else
+ return 0
+ fi
+}
+if test "x$BUILD_CMAN_SUPPORT" = "xyes"; then
+ AC_MSG_CHECKING([for a new enough umount])
+ if umount_newp; then
+ AC_MSG_RESULT([found])
+ else
+ BUILD_CMAN_SUPPORT=
+ AC_MSG_RESULT([not found])
+ AC_MSG_WARN([umount is not new enough, cman support will not be built])
+ fi
+fi
AC_SUBST(BUILD_CMAN_SUPPORT)
BUILD_OCFS2CONSOLE=
More information about the Ocfs2-tools-commits
mailing list