committing changes in /etc made by "-bash"

Package changes:
This commit is contained in:
2022-06-28 13:58:41 +03:00
parent 8d7d57094b
commit d88901024c
6 changed files with 28 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# We're passed the version of the kernel being installed
inst_kern=$1
@@ -11,17 +11,16 @@ _get_kernel_dir() {
Linux) DIR="/lib/modules/$KVER/build" ;;
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
esac
echo $DIR
echo "$DIR"
}
_check_kernel_dir() {
DIR=$(_get_kernel_dir $1)
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 ;;
Linux) test -e "$DIR/include" ;;
GNU/kFreeBSD) test -e "$DIR/kern" && test -e "$DIR/conf/kmod.mk" ;;
*) false ;;
esac
return $?
}
case "${uname_s}" in
@@ -36,10 +35,10 @@ case "${uname_s}" in
esac
if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
exec /usr/lib/dkms/dkms_autoinstaller start $inst_kern
exec /usr/lib/dkms/dkms_autoinstaller start "$inst_kern"
fi
if ! _check_kernel_dir $inst_kern ; then
if ! _check_kernel_dir "$inst_kern" ; then
echo "dkms: WARNING: $kernel headers are missing, which may explain the above failures." >&2
echo " please install the $header_pkg package to fix this." >&2
fi