@@ -265,6 +265,7 @@ SCRIPT_UPSTREAM="$PATCH_DIR/phreaknet.sh"
265
265
DEBUG_LEVEL=0
266
266
FREEPBX_GUI=0
267
267
GENERIC_HEADERS=0
268
+ AUTOSET_KVERS=0
268
269
EXTERNAL_CODECS=0
269
270
RTPULSING=1
270
271
HEARPULSING=1
@@ -580,6 +581,7 @@ Options:
580
581
--sccp install: Install chan_sccp channel driver (Cisco Skinny)
581
582
--drivers install: Also install DAHDI drivers removed in 2018
582
583
--generic install: Use generic kernel headers that do not match the installed kernel version
584
+ --autokvers install: Automatically pass the appropriate value for KVERS for DAHDI compilation (only needed on non-Debian systems)
583
585
--extcodecs install: Specify this if any external codecs are being or will be installed
584
586
--freepbx install: Install FreePBX GUI (not recommended)
585
587
--manselect install: Manually run menuselect yourself
@@ -1692,6 +1694,10 @@ install_dahdi() {
1692
1694
fi
1693
1695
if [ " $KERNEL_DEVEL_VERSION " != " $kernel_ver " ]; then
1694
1696
echoerr " kernel-devel mismatch still present? ($KERNEL_DEVEL_VERSION != $kernel_ver )"
1697
+ if [ " $AUTOSET_KVERS " = " 1" ]; then
1698
+ printf " Auto-setting KVERS=%s\n" " $KERNEL_DEVEL_VERSION "
1699
+ KVERS=" $KERNEL_DEVEL_VERSION "
1700
+ fi
1695
1701
if [ " $KVERS " != " " ]; then
1696
1702
# Kernel version override for GitHub CI builds, where the available headers on Fedora-based distros
1697
1703
# do not match the running kernel. This probably would not run successfully, but in this case,
@@ -2896,7 +2902,7 @@ else
2896
2902
fi
2897
2903
2898
2904
FLAG_TEST=0
2899
- PARSED_ARGUMENTS=$( getopt -n phreaknet -o bc:u:dfhostu:v:w -l backtraces,cc:,dahdi,force,flag-test,help,sip,testsuite,user:,version:,weaktls,alsa,cisco,sccp,clli:,debug:,devmode,disa:,drivers,experimental,extcodecs,fast,freepbx,generic,lightweight,api-key:,rotate,audit,boilerplate,upstream:,manselect,minimal,vanilla,wanpipe -- " $@ " )
2905
+ PARSED_ARGUMENTS=$( getopt -n phreaknet -o bc:u:dfhostu:v:w -l backtraces,cc:,dahdi,force,flag-test,help,sip,testsuite,user:,version:,weaktls,alsa,cisco,sccp,clli:,debug:,devmode,disa:,drivers,experimental,extcodecs,fast,freepbx,generic,autokvers, lightweight,api-key:,rotate,audit,boilerplate,upstream:,manselect,minimal,vanilla,wanpipe -- " $@ " )
2900
2906
VALID_ARGUMENTS=$?
2901
2907
if [ " $VALID_ARGUMENTS " != " 0" ]; then
2902
2908
usage
@@ -2941,6 +2947,7 @@ while true; do
2941
2947
--fast ) FAST_COMPILE=1; shift ;;
2942
2948
--freepbx ) FREEPBX_GUI=1; shift ;;
2943
2949
--generic ) GENERIC_HEADERS=1; shift ;;
2950
+ --autokvers ) AUTOSET_KVERS=1; shift ;;
2944
2951
--lightweight ) LIGHTWEIGHT=1; shift ;;
2945
2952
--api-key ) INTERLINKED_APIKEY=$2 ; shift 2;;
2946
2953
--rotate ) ASTKEYGEN=1; shift ;;
0 commit comments