diff options
-rwxr-xr-x | live_zap | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -8,7 +8,6 @@ MODULES_DIR="$DESTDIR/lib/modules/$KVERS/misc" XPP_SYNC=auto AST_SCRIPT=/etc/init.d/asterisk # Use this file to pass options to modules: -MODPROBE_FILE=$DESTDIR/modprobe.conf PERLLIBDIR=`perl -V:sitelib | cut -d "'" -f 2` # Manual list of modules. They will be loaded by insmod. @@ -23,8 +22,25 @@ REMOVE_MODULES="zaptel" if [ -r $DESTDIR/live.conf ]; then . $DESTDIR/live.conf; fi +# Give priority to our installed binaries: +PATH=$DESTDIR/sbin:$DESTDIR/usr/sbin:$PATH +export PATH + +# TODO: If you already use PERL5DIR, please fix this part: +PERL5LIB="$DESTDIR/$PERLLIBDIR" +export PERL5LIB + +# the same as xpp/utils/zaptel_drivers . +# With the remote mode, I can't rely on files in the source directory. +zaptel_drivers() { + perl -MZaptel::Hardware -e ' + my $hardware = Zaptel::Hardware->scan; + print join(" ", $hardware->drivers); + ' +} + # Detect the modules used in the system: -for mod in `xpp/utils/zaptel_drivers`; do +for mod in `zaptel_drivers`; do case "$mod" in xpp_usb) MODULES_LOAD="$MODULES_LOAD xpp/xpp xpp/xpd_fxs" @@ -99,14 +115,6 @@ usage() { echo "$me load /etc/init.d/zaptel start" } -# Give priority to our installed binaries: -PATH=$DESTDIR/sbin:$DESTDIR/usr/sbin:$PATH -export PATH - -# TODO: If you already use PERL5DIR, please fix this part: -PERL5LIB="$DESTDIR/$PERLLIBDIR" -export PERL5LIB - case "$1" in install) shift @@ -115,7 +123,6 @@ install) config) shift make config DESTDIR=$DESTDIR "$@" - touch $MODPROBE_FILE mkdir -p $DESTDIR/etc/asterisk ;; rsync) |