<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffcc" text="#330000">
tzafrir,<br>
thanks for the note. btw, Great docs!<br>
asciidocs looks cool too!<br>
thanks!<br>
daveC<br>
<br>
Tzafrir Cohen wrote:
<blockquote cite="mid20071219080253.GA19813@xorcom.com" type="cite">
  <pre wrap="">Hi

On Wed, Dec 19, 2007 at 12:19:08AM -0500, dave cantera wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You can find my take on the subject at
<a class="moz-txt-link-freetext" href="http://updates.xorcom.com/astribank/bristuff/1.4/bristuff-current/">http://updates.xorcom.com/astribank/bristuff/1.4/bristuff-current/</a>
I improved the existing scripts from bristuff to be more potent, as
explained in
<a class="moz-txt-link-freetext" href="http://updates.xorcom.com/astribank/bristuff/1.4/INSTALL.html">http://updates.xorcom.com/astribank/bristuff/1.4/INSTALL.html</a>

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.

  </pre>
  <blockquote type="cite">
    <pre wrap="">
#!/bin/sh
#
#    get_latest_rel.sh
#
# Dave Cantera:  <a class="moz-txt-link-abbreviated" href="mailto:david.cantera@IBSOneCall.com">david.cantera@IBSOneCall.com</a>
#
#    get the current asterisk release components, put them in our REPOSITORY
#    and unpack them in SRC_ROOT

####-----------&lt; Change to suite between these lines &gt;--------------
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"
####-----------&lt; Change to suite between these lines &gt;--------------

HTTP_SITE=<a class="moz-txt-link-rfc2396E" href="http://downloads.digium.com">"http://downloads.digium.com"</a>
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 "-------------------&lt; Activity Recap &gt;----------------"
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" ]
    </pre>
  </blockquote>
  <pre wrap=""><!---->
# a matter of style:
case "$ANSWER" in Y* | y*) :;; 
  *) echo " Aborted by user ";;
  exit 0
esac

# and good bye to unneeded nesting.

  </pre>
  <blockquote type="cite">
    <pre wrap="">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 &amp; 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}
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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 

  </pre>
  <blockquote type="cite">
    <pre wrap="">    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 &amp; 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:
    </pre>
    <blockquote type="cite">
      <pre wrap="">At 10:33 AM 12/17/2007, you wrote:
  
      </pre>
      <blockquote type="cite">
        <pre wrap="">At 02:55 AM 12/17/2007, you wrote:
    
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">I wonder if there are any major obstacles for upgrading.
        
            </pre>
          </blockquote>
        </blockquote>
        <pre wrap="">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.
    
        </pre>
      </blockquote>
      <pre wrap="">
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 <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a>--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>



  
      </pre>
    </blockquote>
    <pre wrap="">-- 
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 <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a>--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="132">-- 
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


</pre>
</body>
</html>