Skip to content

Commit

Permalink
DAHDI Linux: Don't fail if kbuild Makefile can't be patched.
Browse files Browse the repository at this point in the history
On certain systems, this fails, and it's not required for
a successful installation, so patch if applicable but
skip otherwise.

PHREAKSCRIPT-60 #close
  • Loading branch information
InterLinked1 committed Nov 19, 2024
1 parent 157d8d3 commit cb51037
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions phreaknet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1703,14 +1703,24 @@ install_dahdi() {
# https://github.com/aircrack-ng/rtl8188eus/issues/263#issuecomment-1715699688
# Fixed by commenting out lines 61-63
KERNEL_MM=$( uname -r | cut -d'.' -f1-2 )
printf "Kernel major.minor version is %s\n" "$KERNEL_MM"
KBUILD_DIR="/usr/lib/linux-kbuild-${KERNEL_MM}"
MODFINAL_FILE="${KBUILD_DIR}/scripts/Makefile.modfinal"
if [ -f "$MODFINAL_FILE" ]; then
sed -n 61,63p $MODFINAL_FILE
phreak_tree_patch $MODFINAL_FILE "modfinal.diff"
sed -n 61,63p $MODFINAL_FILE
if [ -d "$KBUILD_DIR" ]; then
MODFINAL_FILE="${KBUILD_DIR}/scripts/Makefile.modfinal"
if [ -f "$MODFINAL_FILE" ]; then
sed -n 61,63p $MODFINAL_FILE
sed -n 61,63p $MODFINAL_FILE | grep "CONFIG_DEBUG_INFO_BTF_MODULES"
if [ $? -eq 0 ]; then
phreak_tree_patch $MODFINAL_FILE "modfinal.diff"
sed -n 61,63p $MODFINAL_FILE
else
echoerr "Skipping modfinal patch, expected content differs on line 61"
fi
else
echoerr "Could not determine path to Makefile.modfinal"
fi
else
echoerr "Could not determine path to Makefile.modfinal"
echoerr "Could not determine path to kbuild dir"
fi

# Requests to downloads.digium.com usually use IPv4, but sometimes use IPv6
Expand Down

0 comments on commit cb51037

Please sign in to comment.