[asterisk-commits] pabelanger: branch pabelanger/non-root r261558 - in /team/pabelanger/non-root...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 6 10:02:20 CDT 2010
Author: pabelanger
Date: Thu May 6 10:02:17 2010
New Revision: 261558
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261558
Log:
By default, install Asterisk as non-root user.
Formating changes.
Modified:
team/pabelanger/non-root/configure
team/pabelanger/non-root/configure.ac
team/pabelanger/non-root/include/asterisk/autoconfig.h.in
Modified: team/pabelanger/non-root/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/configure.ac?view=diff&rev=261558&r1=261557&r2=261558
==============================================================================
--- team/pabelanger/non-root/configure.ac (original)
+++ team/pabelanger/non-root/configure.ac Thu May 6 10:02:17 2010
@@ -487,20 +487,18 @@
AC_DEFINE_UNQUOTED([AST_GROUP],"$ast_group",[name of the Asterisk group])
AC_ARG_ENABLE([non-root],
- [AS_HELP_STRING([--enable-non-root],
- [Enable non-root Asterisk installation])],
+ [AS_HELP_STRING([--disable-non-root],
+ [Explicity disable non-root installation])],
[case "${enableval}" in
- y|ye|yes) test_nonroot="yes" ;;
- n|no) test_nonroot="no" ;;
- *) AC_MSG_ERROR(bad value ${enableeval} for --enable-non-root) ;;
- esac])
+ y|ye|yes) disable_nonroot=no ;;
+ n|no) disable_nonroot=yes ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-non-root) ;;
+ esac], [disable_nonroot=no])
dnl Check for asterisk in /etc/passwd
-if test "${test_nonroot}" = "yes"
-then
+if test "${disable_nonroot}" != "yes" ; then
dnl parse /etc/passwd
- if test "${use_id}" = "no"
- then
+ if test "${use_id}" = "no" ; then
AC_MSG_CHECKING([for ${ast_user} in /etc/passwd])
if test -r /etc/passwd ; then
astuser=`cat /etc/passwd | grep "^${ast_user}:"`
@@ -520,10 +518,12 @@
fi
fi
- if test -z "${astuser}" || test -z "${astgroup}"
- then
+ if test -z "${astuser}" || test -z "${astgroup}" ; then
AC_MSG_RESULT(no)
- AC_MSG_ERROR([User ${ast_user} (and/or group ${ast_group}) doesn't exist. Please read the documentation !])
+ AC_MSG_NOTICE(*** Unable to install Asterisk using ${ast_user}:${ast_group} permission; confirm both user and group exist.)
+ AC_MSG_NOTICE(*** Please run the 'configure' script with the '--disable-non-root' parameter option)
+ AC_MSG_NOTICE(*** or create the appropiate user and group.)
+ exit 1
else
AC_MSG_RESULT([yes, user ${ast_user} and group ${ast_group}])
AST_USER="${ast_user}"
Modified: team/pabelanger/non-root/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/include/asterisk/autoconfig.h.in?view=diff&rev=261558&r1=261557&r2=261558
==============================================================================
--- team/pabelanger/non-root/include/asterisk/autoconfig.h.in (original)
+++ team/pabelanger/non-root/include/asterisk/autoconfig.h.in Thu May 6 10:02:17 2010
@@ -964,7 +964,7 @@
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
-/* Define to 1 if `struct stat' is a member of `st_blksize'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
/* Define to 1 if you have the mISDN Supplemental Services library. */
More information about the asterisk-commits
mailing list