Hi
On Wed, Dec 19, 2007 at 12:19:08AM -0500, dave cantera wrote:
ok, here is my $0.02... I created a script since I had to
install/update so often and for various reasons...
you can choose to compile automatically or manually...
modify the current release numbers, your repository, and source root...
all else is automated..
which is unloading zap driver, stopping a running asterisk, getting the
current release, untar'ng it and compiling it...
enjoy,
daveC
You can find my take on the subject at
http://updates.xorcom.com/astribank/bristuff/1.4/bristuff-current/
I improved the existing scripts from bristuff to be more potent, as
explained in
http://updates.xorcom.com/astribank/bristuff/1.4/INSTALL.html
The bristuff scripts have a little wrapper install.sh that calls
download.sh (downloads and patches. Kind of like rpmbuild -bp) and
compile.sh (builds and installs).
That separation can reduce some of the need for user interaction in your
script.
If you want to use them, I figure you should just remove the patching
commands and then you should be able to use those scripts mostly
unchanged.
#!/bin/sh
#
# get_latest_rel.sh
#
# Dave Cantera: [EMAIL PROTECTED]
#
# get the current asterisk release components, put them in our REPOSITORY
# and unpack them in SRC_ROOT
####-----------< Change to suite between these lines >--------------
VER_AST="1.4.16"
VER_ZAPTEL="1.4.7.1"
VER_LIBPRI="1.4.3"
VER_ADDONS="1.4.5"
REPOSITORY="/root/tarballs"
SRC_ROOT="/usr/local/src"
####-----------< Change to suite between these lines >--------------
HTTP_SITE="http://downloads.digium.com"
PUB_DIR="/pub"
TARBALL_AST="/asterisk/releases/asterisk-${VER_AST}.tar.gz"
TARBALL_LIBPRI="/libpri/releases/libpri-${VER_LIBPRI}.tar.gz"
TARBALL_ZAPTEL="/zaptel/releases/zaptel-${VER_ZAPTEL}.tar.gz"
TARBALL_ADDONS="/asterisk/releases/asterisk-addons-${VER_ADDONS}.tar.gz"
COMPONENTS="${HTTP_SITE}${PUB_DIR}${TARBALL_AST}
${HTTP_SITE}${PUB_DIR}${TARBALL_ZAPTEL}
${HTTP_SITE}${PUB_DIR}${TARBALL_LIBPRI}
${HTTP_SITE}${PUB_DIR}${TARBALL_ADDONS} "
echo
echo
echo " we are prepared to get the complete current release "
echo " of asterisk, libpri, zaptel, and addons "
echo " the tarballs will be placed in our REPOSITORY and "
echo " then extracted to our SRC_ROOT "
echo
echo "-------------------< Activity Recap >----------------"
echo
echo " TARBALL REPOSITORY: ${REPOSITORY}"
echo " SRC_ROOT: ${SRC_ROOT}"
echo " asterisk tarball: ${TARBALL_AST}"
echo " libpri tarball: ${TARBALL_LIBPRI}"
echo " zaptel tarball: ${TARBALL_ZAPTEL}"
echo " addons tarball: ${TARBALL_ADDONS}"
echo
echo -n " Are You Ready? Y to procced: "
read ANSWER
if [ "null${ANSWER}" == "nullY" ]
# a matter of style:
case "$ANSWER" in Y* | y*) :;;
*) echo " Aborted by user ";;
exit 0
esac
# and good bye to unneeded nesting.
then
echo
echo "-----------------"
echo " stopping asterisk "
echo
echo " choose your poison: "
echo " a) /usr/bin/asterisk -xr stop now"
echo " b) /etc/init.d/asterisk stop "
echo
echo -n " which one? "
read STOPCMD
if [ "null${STOPCMD}" == "nulla" ]
then
/usr/bin/asterisk -r -x 'stop now'
fi
if [ "null${STOPCMD}" == "nullb" ]
then
/etc/init.d/asterisk stop
fi
echo
echo "-----------------"
echo " get the current asterisk & component releases and put them in
our repository ${REPOSITORY}"
# lets go to the repository directory
cd ${REPOSITORY}
for TARBALL in `echo ${COMPONENTS}`
do
echo " getting component: ${TARBALL} "
# wget ${TARBALL}
Err... one needs to uncomment that line, I guess.
I tend to like using 'wget -c' . Otherwise strange things may happen if
I press ctrl-C in the middle of the download.
Sadly, the current downloads.digium.com will make you re-download the
tarballs
done
TARFILES="
asterisk-${VER_AST}.tar.gz
libpri-${VER_LIBPRI}.tar.gz
zaptel-${VER_ZAPTEL}.tar.gz
asterisk-addons-${VER_ADDONS}.tar.gz "
echo
echo "-----------------"
echo " unpack the current asterisk & component tarballs into our
source root ${SRC_ROOT}"
# lets go to the source root directory
cd ${SRC_ROOT}
for TARBALL in `echo ${TARFILES}`
do
echo " untar'ng component: ${TARBALL} "
# tar xzf ${TARBALL}
done
echo
echo "-----------------"
echo " unloading Zap drivers"
# unload the zaptel drivers
ZAP_MODULES=`lsmod | grep zap | awk '{printf("%s,",$4)}' | sed 's/,/
/g'`
for MODULE in `echo ${ZAP_MODULES}`
do
echo " unloading zap module: ${MODULE}"
# modprobe -r ${MODULE}
done
echo
echo " now you are ready to compile at ${SRC_ROOT} "
echo
echo -n " Shall I continue with the compile? Y?"
read COMPILE
if [ "null${COMPILE}" == "nullY" ]
then
echo " Compiling Zaptel version ${VER_ZAPTEL}"
cd "${SRC_ROOT}/zaptel-${VER_ZAPTEL}"
make;make; make install
echo " Compiling libpri version ${VER_LIBPRI}"
cd "${SRC_ROOT}/libpri-${VER_LIBPRI}"
make; make install
echo " Compiling Asterisk version ${VER_AST} "
cd "${SRC_ROOT}/asterisk-${VER_AST}"
make; ./configure; make; make install
echo " Compiling Asterisk Addons version ${VER_ADDONS} "
cd "${SRC_ROOT}/asterisk-addons-${VER_AST}"
echo " make disabled..."
#make; make install
else
echo " Ok, compile it yourself! "
fi
else
echo " Aborted by user "
fi
exit
------
Ira wrote:
At 10:33 AM 12/17/2007, you wrote:
At 02:55 AM 12/17/2007, you wrote:
I wonder if there are any major obstacles for upgrading.
Because of your message I tried upgrading to 1.4 again Saturday. That
was the third or fourth time I've tried and the first time it's
lasted more than a few hours before segfaulting and causing me to
step back to 1.2. It seems like I might be staying with 1.4 this time
as 2 days later it's still working. I did find one last deprecated
function in the startup logs and fixed that so I should now be good
for the 1.6 upgrade.
Well, I spoke too soon. This morning I'll be going back to 1.2 as
1.4.15 just segfaulted. It always happens when something is going on
with a Zap call, this time it was hanging up a call.
I've no idea what might be the problem or how to even begin to
troubleshoot. And it's my business so I can only play on Saturdays,
gives me 2 days to fix it if there's a problem, sadly this time, it
took 2 days to break
Ira
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
My wife's sister is in California.
I should buy her a Videophone2008!
Truly, The Next Best Thing to Being There!
--
WorldWideVideoPhones.com
856.380.0894
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users