diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a8da47..e259732 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -188,7 +188,7 @@ jobs: - name: Build DAHDI and Asterisk run: | ./phreaknet.sh make - KVERS="6.13.0-0.rc2" phreaknet install --fast --dahdi --drivers --devmode + phreaknet install --fast --dahdi --autokvers --drivers --devmode alma-9-5: runs-on: ubuntu-24.04 name: Alma Linux 9.5 @@ -198,7 +198,7 @@ jobs: - name: Build DAHDI and Asterisk run: | ./phreaknet.sh make - KVERS="5.14.0-503.15.1" phreaknet install --fast --dahdi --drivers --devmode + phreaknet install --fast --dahdi --autokvers --drivers --devmode rocky-9: runs-on: ubuntu-24.04 name: Rocky Linux 9.3 @@ -208,7 +208,7 @@ jobs: - name: Build DAHDI and Asterisk run: | ./phreaknet.sh make - KVERS="5.14.0-503.16.1" phreaknet install --fast --dahdi --drivers --devmode + phreaknet install --fast --dahdi --autokvers --drivers --devmode rocky-8: runs-on: ubuntu-24.04 name: Rocky Linux 8.9 @@ -218,7 +218,7 @@ jobs: - name: Build DAHDI and Asterisk run: | ./phreaknet.sh make - KVERS="4.18.0-553.32.1" phreaknet install --fast --dahdi --drivers --devmode + phreaknet install --fast --dahdi --autokvers --drivers --devmode opensuse: runs-on: ubuntu-24.04 name: openSUSE Tumbleweed diff --git a/phreaknet.1.md b/phreaknet.1.md index 2c8c7b9..2cf3f15 100644 --- a/phreaknet.1.md +++ b/phreaknet.1.md @@ -291,6 +291,12 @@ The following options may be used with the **install** command. **--drivers** : Also install DAHDI drivers removed in 2018 by Sangoma +**--generic** +: Use generic kernel headers that do not match the installed kernel version + +**--autokvers** +: Automatically pass the appropriate value for KVERS for DAHDI compilation (only needed on non-Debian systems) + **--experimental** : Install experimental features that may not be production ready diff --git a/phreaknet.sh b/phreaknet.sh index ba21804..849bdef 100755 --- a/phreaknet.sh +++ b/phreaknet.sh @@ -265,6 +265,7 @@ SCRIPT_UPSTREAM="$PATCH_DIR/phreaknet.sh" DEBUG_LEVEL=0 FREEPBX_GUI=0 GENERIC_HEADERS=0 +AUTOSET_KVERS=0 EXTERNAL_CODECS=0 RTPULSING=1 HEARPULSING=1 @@ -580,6 +581,7 @@ Options: --sccp install: Install chan_sccp channel driver (Cisco Skinny) --drivers install: Also install DAHDI drivers removed in 2018 --generic install: Use generic kernel headers that do not match the installed kernel version + --autokvers install: Automatically pass the appropriate value for KVERS for DAHDI compilation (only needed on non-Debian systems) --extcodecs install: Specify this if any external codecs are being or will be installed --freepbx install: Install FreePBX GUI (not recommended) --manselect install: Manually run menuselect yourself @@ -1692,6 +1694,10 @@ install_dahdi() { fi if [ "$KERNEL_DEVEL_VERSION" != "$kernel_ver" ]; then echoerr "kernel-devel mismatch still present? ($KERNEL_DEVEL_VERSION != $kernel_ver)" + if [ "$AUTOSET_KVERS" = "1" ]; then + printf "Auto-setting KVERS=%s\n" "$KERNEL_DEVEL_VERSION" + KVERS="$KERNEL_DEVEL_VERSION" + fi if [ "$KVERS" != "" ]; then # Kernel version override for GitHub CI builds, where the available headers on Fedora-based distros # do not match the running kernel. This probably would not run successfully, but in this case, @@ -2941,6 +2947,7 @@ while true; do --fast ) FAST_COMPILE=1; shift ;; --freepbx ) FREEPBX_GUI=1; shift ;; --generic ) GENERIC_HEADERS=1; shift ;; + --autokvers ) AUTOSET_KVERS=1; shift ;; --lightweight ) LIGHTWEIGHT=1; shift ;; --api-key ) INTERLINKED_APIKEY=$2; shift 2;; --rotate ) ASTKEYGEN=1; shift ;;