FreePBX / sng_freepbx_debian_install

FreePBX 17 Installation Script
100 stars 35 forks source link

[bug]: FreePBX 17 install script doesn't install DAHDI and WANPIPE kernel modules #32

Closed arielgrin closed 4 months ago

arielgrin commented 5 months ago

FreePBX Version

FreePBX 17

Issue Description

After executing FreePBX 17 install script, DAHDI and WANPIPE kernel modules are not installed, probably due to line 502, which should set variable kernel_version to the supported installed kernel version 6.1.0-18 but doesn't set it.

Line 502: kernel_version=apt-cache show linux-headers-$(uname -r) | sed -n -e 's/Package: linux-headers-\\([[:digit:].-]*\\).*/\\1/' -e 's/-\$//p' | uniq

Operating Environment

FreePBX 17 Debian 12.5 with kernel 6.1.0-18

Relevant log output

root@debian:~# apt-cache show linux-headers-$(uname -r)
Package: linux-headers-6.1.0-18-amd64
Source: linux
Version: 6.1.76-1
Installed-Size: 3626
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Architecture: amd64
Depends: linux-headers-6.1.0-18-common (= 6.1.76-1), linux-kbuild-6.1 (>= 6.1.76-1), linux-compiler-gcc-12-x86
Description-en: Header files for Linux 6.1.0-18-amd64
 This package provides the architecture-specific kernel header files for
 Linux kernel 6.1.0-18-amd64, generally used for building out-of-tree
 kernel modules.  These files are going to be installed into
 /usr/src/linux-headers-6.1.0-18-amd64, and can be used for building
 modules that load into the kernel provided by the
 linux-image-6.1.0-18-amd64 package.
Description-md5: 0edbd00d9f709af6f3f412e84a53af11
Homepage: https://www.kernel.org/
Section: kernel
Priority: optional
Filename: pool/main/l/linux/linux-headers-6.1.0-18-amd64_6.1.76-1_amd64.deb
Size: 1315292
MD5sum: cfe7d31eec41faaff93d13d13bab8c64
SHA256: 57ca07f69b4cef48cdb8bb5df29665f8d85576162ef1036b6e3b46ed95cf77c2

root@debian:~# apt-cache show linux-headers-$(uname -r) | sed -n -e 's/Package: linux-headers-\\([[:digit:].-]*\\).*/\\1/' -e 's/-\$//p' | uniq
root@debian:~#
push143smart commented 5 months ago

Hi @arielgrin ,

Thanks a lot for reporting the same but it does not seem to be an issue which you have pointed out. The below command does provide the required output if echoed or assigned to a shell variable. apt-cache show linux-headers-$(uname -r) | sed -n -e 's/Package: linux-headers-\([[:digit:].-]\)./\1/' -e 's/-\$//p' | uniq

Also, we did try to run the script on debian system to install dahdi / wanpipe and we can see dahdi / wanpipe getting installed properly without any issues.

It would be great if you could share the logs with us so that we can check what is happening on your system due to which dahdi and wanpipe are not getting installed properly on your system.

Best Regards, Pushkar

arielgrin commented 4 months ago

Which specific log would you need me to attach?

push143smart commented 4 months ago

@arielgrin Can you please attach /var/log/pbx/freepbx17-install-(date)>

Please attach the latest logging of the same.

arielgrin commented 4 months ago

I reinstalled FreePBX 17 from scratch and again I can confirm that the kernel modules are not installed. The only DAHDI related package installed is the following

root@debian:/# apt list --installed|grep dahdi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

asterisk21-dahdi/bookworm,now 21.0.2-1.sng12 amd64 [installed]

I'm attaching the requested log

freepbx17-install-2024.05.06-07.37.19.log

push143smart commented 4 months ago

Hello @arielgrin ,

We went through the logs and from the logs it appears that you have not been utilizing the --dahdi option when running the sng_freepbx_debian_install.sh script to install dahdi and wanpipe related packages.

To install the dahdi packages as well, the user needs to execute the sng_freepbx_debian_install.sh script with the --dahdi option. For example:

bash sng_freepbx_install.sh --dahdi

I would request you to please run the same with --dahdi option in order to make sure that the script does install the dahdi packages.

Best Regards, Pushkar

arielgrin commented 4 months ago

Thanks for the advice. If I remember correctly, there is no explanation anywhere that the --dahdi parameter must be passed to the script in order to install DAHDI support.

I will reinstall with that option and let you know.

kguptasangoma commented 4 months ago

Hi @arielgrin We are yet to document all the script options, right now we are just ensuring that dahdi works fine on Debian 12 / FreePBX 17.

Thank you for testing Freepbx 17. Kapil Gupta

arielgrin commented 4 months ago

I have just installed FreePBX 17 again, this time using the --dahdi parameter, and I can confirm that using the parameter --dahdi has solved the issue. I think it would be beneficial to all of us that are testing the install script to document the different parameters that might modify the end result of the installation. At least to me, in this case it would have been very useful to know about the --dahdi parameter in advance, since I performed the installation several times, with different kernel versions and also compiling DAHDI from source.