[svn-commits] pabelanger: branch pabelanger/issue17165 r257640 - /team/pabelanger/issue1716...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Apr 16 08:07:07 CDT 2010
Author: pabelanger
Date: Fri Apr 16 08:07:05 2010
New Revision: 257640
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=257640
Log:
Revert previous change. More testing requred.
Modified:
team/pabelanger/issue17165/contrib/scripts/live_ast
Modified: team/pabelanger/issue17165/contrib/scripts/live_ast
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue17165/contrib/scripts/live_ast?view=diff&rev=257640&r1=257639&r2=257640
==============================================================================
--- team/pabelanger/issue17165/contrib/scripts/live_ast (original)
+++ team/pabelanger/issue17165/contrib/scripts/live_ast Fri Apr 16 08:07:05 2010
@@ -98,6 +98,12 @@
# live_ast will edit makeopts to use that second copy after ./configure
# is run.
#LIVE_AST_BRISTUFFED_LIBPRI=yes
+#
+# LIVE_AST_FOR_SYSTEM
+# When generating asterisk.conf, use most components from the installed
+# system. Also provide a sane var-run directory for those of us who want
+# to do the right thing and run asterisk as non-root.
+#LIVE_AST_FOR_SYSTEM=yes
####################### End Samples
BASE_DIR="$PWD/live"
@@ -109,7 +115,12 @@
DISABLED_MODS="chan_h323 pbx_dundi"
DISABLED_MODS_FILE="modules-disabled.conf"
-LIVE_AST_CONFIGURE_PARAMS="$LIVE_AST_CONFIGURE_PARAMS --prefix=$BASE_DIR"
+update_conf() {
+ sed -r -s \
+ -e "/^;ast(etc|mod|varlib|data|agi|run|spool|log|db|key)dir\>/s| /| $BASE_DIR/|" \
+ -e "s/^;ast(etc|mod|varlib|data|agi|run|spool|log|db|key)dir/ast\1dir/" \
+ "$AST_CONF" > "$AST_CONF".tmp && mv "$AST_CONF".tmp "$AST_CONF"
+}
if [ -r "$LIVE_CONF" ]; then . "$LIVE_CONF"; fi
@@ -170,7 +181,7 @@
case "$command" in
configure)
- ./configure $LIVE_AST_CONFIGURE_PARAMS "$@"
+ ./configure --prefix=$BASE_DIR $LIVE_AST_CONFIGURE_PARAMS "$@"
if [ "$LIVE_AST_FORCE_DEF_CONF" != '' ]; then
rm -f menuselect.makeopts
fi
@@ -182,13 +193,21 @@
fi
;;
install)
- make install "$@"
+ make install DESTDIR="$BASE_DIR" "$@"
;;
testsuite)
- make install samples "$@"
+ make install samples DESTDIR="$BASE_DIR" "$@"
+ update_conf
;;
samples)
- make samples "$@"
+ make samples DESTDIR="$BASE_DIR" "$@"
+ update_conf
+# if [ "$LIVE_AST_FOR_SYSTEM" != '' ]; then
+# sed -r -i \
+# -e "/^ast(etc|varlib|data|agi|run|spool|log|db|key)dir\>/s|^|;|" \
+# -e "/^;astrundir\>/aastrundir => /var/run/asterisk" \
+# "$AST_CONF"
+# fi
# disable some modules that bind on a port that is already in use by a
# main Asterisk copy, and would crash asterisk in failing:
rm -f "$AST_CONF_DIR/$DISABLED_MODS_FILE"
More information about the svn-commits
mailing list