committing changes in /etc made by "-bash"
Package changes:
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "add" ]; then
|
||||
/etc/kernel/postinst.d/dkms "$2"
|
||||
fi
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
/etc/kernel/prerm.d/dkms "$2"
|
||||
fi
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# We're passed the version of the kernel being installed
|
||||
inst_kern=$1
|
||||
|
||||
uname_s=$(uname -s)
|
||||
|
||||
_get_kernel_dir() {
|
||||
KVER=$1
|
||||
case ${uname_s} in
|
||||
Linux) DIR="/lib/modules/$KVER/build" ;;
|
||||
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
|
||||
esac
|
||||
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
|
||||
}
|
||||
|
||||
case "${uname_s}" in
|
||||
Linux)
|
||||
header_pkg="linux-headers-$inst_kern"
|
||||
kernel="Linux"
|
||||
;;
|
||||
GNU/kFreeBSD)
|
||||
header_pkg="kfreebsd-headers-$inst_kern"
|
||||
kernel="kFreeBSD"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
|
||||
exec /usr/lib/dkms/dkms_autoinstaller start "$inst_kern"
|
||||
fi
|
||||
|
||||
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
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# We're passed the version of the kernel being removed
|
||||
inst_kern=$1
|
||||
|
||||
if command -v dkms > /dev/null; then
|
||||
dkms status -k "$inst_kern" 2>/dev/null | while IFS=",:/ " read -r name vers _ arch status; do
|
||||
[ "$status" = "installed" ] || continue
|
||||
echo "dkms: removing: $name $vers ($inst_kern) ($arch)" >&2
|
||||
dkms remove -m "$name" -v "$vers" -k "$inst_kern" -a "$arch"
|
||||
done
|
||||
fi
|
||||
|
||||
rmdir --ignore-fail-on-non-empty \
|
||||
"/lib/modules/$inst_kern/updates/dkms" \
|
||||
"/lib/modules/$inst_kern/updates" 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user