Skip to content

Commit

Permalink
Drop GNU/kFreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
scaronni authored and amilonenv committed Oct 7, 2024
1 parent 8c50277 commit cf6973e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 51 deletions.
16 changes: 2 additions & 14 deletions dkms.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ readonly mv_re='^([^/]*)/(.*)$'
_get_kernel_dir() {
if [[ -z $ksourcedir_fromcli ]]; then
KVER=$1
case ${current_os} in
Linux) DIR="$install_tree/$KVER/build" ;;
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
esac
DIR="$install_tree/$KVER/build"
echo $DIR
else
echo $kernel_source_dir
Expand All @@ -67,11 +64,7 @@ _get_kernel_dir() {

_check_kernel_dir() {
DIR=$(_get_kernel_dir $1)
case ${current_os} in
Linux) test -e $DIR/include ;;
GNU/kFreeBSD) test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
*) return 1 ;;
esac
test -e $DIR/include
return $?
}

Expand Down Expand Up @@ -406,11 +399,6 @@ override_dest_module_location()
local orig_location="$1"
[[ ${addon_modules_dir} ]] && echo "/${addon_modules_dir}" && return

if [[ $current_os = GNU/kFreeBSD ]] ; then
# Does not support subdirs, regardless of distribution
echo "" && return
fi

case "$running_distribution" in
fedora* | rhel* | ovm*)
echo "/extra" && return
Expand Down
11 changes: 2 additions & 9 deletions dkms_autoinstaller.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,13 @@ uname_s=$(uname -s)

_get_kernel_dir() {
KVER=$1
case ${uname_s} in
Linux) DIR="@MODDIR@/$KVER/build" ;;
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
esac
DIR="@MODDIR@/$KVER/build"
echo $DIR
}

_check_kernel_dir() {
DIR=$(_get_kernel_dir $1)
case ${uname_s} in
Linux) test -e $DIR/include ;;
GNU/kFreeBSD) test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
*) return 1 ;;
esac
test -e $DIR/include
return $?
}

Expand Down
11 changes: 2 additions & 9 deletions dkms_common.postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@ uname_s=$(uname -s)

_get_kernel_dir() {
KVER=$1
case ${uname_s} in
Linux) DIR="@MODDIR@/$KVER/build" ;;
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
esac
DIR="@MODDIR@/$KVER/build"
echo $DIR
}

_check_kernel_dir() {
DIR=$(_get_kernel_dir $1)
case ${uname_s} in
Linux) test -e $DIR/include ;;
GNU/kFreeBSD) test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
*) return 1 ;;
esac
test -e $DIR/include
return $?
}

Expand Down
23 changes: 4 additions & 19 deletions kernel_postinst.d_dkms.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,17 @@ uname_s=$(uname -s)

_get_kernel_dir() {
KVER=$1
case ${uname_s} in
Linux) DIR="@MODDIR@/$KVER/build" ;;
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
esac
DIR="@MODDIR@/$KVER/build"
echo "$DIR"
}

_check_kernel_dir() {
DIR=$(_get_kernel_dir "$1")
case ${uname_s} in
Linux) test -e "$DIR/include" ;;
GNU/kFreeBSD) test -e "$DIR/kern" && test -e "$DIR/conf/kmod.mk" ;;
*) false ;;
esac
test -e "$DIR/include"
}

case "${uname_s}" in
Linux)
header_pkg="linux-headers-$inst_kern"
kernel="Linux"
;;
GNU/kFreeBSD)
header_pkg="kfreebsd-headers-$inst_kern"
kernel="kFreeBSD"
;;
esac
header_pkg="linux-headers-$inst_kern"
kernel="Linux"

if [ -x @LIBDIR@/dkms_autoinstaller ]; then
exec @LIBDIR@/dkms_autoinstaller start "$inst_kern"
Expand Down

0 comments on commit cf6973e

Please sign in to comment.