committing changes in /etc made by "-bash"
Package changes:
This commit is contained in:
@@ -18,6 +18,7 @@ mkdir -p './cron.weekly'
|
|||||||
mkdir -p './crypto-policies/policies/modules'
|
mkdir -p './crypto-policies/policies/modules'
|
||||||
mkdir -p './cxs/newusers'
|
mkdir -p './cxs/newusers'
|
||||||
mkdir -p './dbus-1/session.d'
|
mkdir -p './dbus-1/session.d'
|
||||||
|
mkdir -p './dkms/framework.conf.d'
|
||||||
mkdir -p './dnf/aliases.d'
|
mkdir -p './dnf/aliases.d'
|
||||||
mkdir -p './dnf/modules.defaults.d'
|
mkdir -p './dnf/modules.defaults.d'
|
||||||
mkdir -p './dnf/plugins/copr.d'
|
mkdir -p './dnf/plugins/copr.d'
|
||||||
@@ -485,7 +486,7 @@ maybe chmod 0755 'dhcp/dhclient.d'
|
|||||||
maybe chmod 0755 'dhcp/dhclient.d/chrony.sh'
|
maybe chmod 0755 'dhcp/dhclient.d/chrony.sh'
|
||||||
maybe chmod 0755 'dkms'
|
maybe chmod 0755 'dkms'
|
||||||
maybe chmod 0644 'dkms/framework.conf'
|
maybe chmod 0644 'dkms/framework.conf'
|
||||||
maybe chmod 0755 'dkms/sign_helper.sh'
|
maybe chmod 0755 'dkms/framework.conf.d'
|
||||||
maybe chmod 0755 'dnf'
|
maybe chmod 0755 'dnf'
|
||||||
maybe chmod 0755 'dnf/aliases.d'
|
maybe chmod 0755 'dnf/aliases.d'
|
||||||
maybe chmod 0644 'dnf/dnf.conf'
|
maybe chmod 0644 'dnf/dnf.conf'
|
||||||
|
|||||||
@@ -25,9 +25,12 @@
|
|||||||
# non-null value:
|
# non-null value:
|
||||||
# autoinstall_all_kernels=""
|
# autoinstall_all_kernels=""
|
||||||
|
|
||||||
# Script to sign modules during build, script is called with kernel version
|
# Location of the sign-file kernel binary (default: depends on distributioin):
|
||||||
# and module name:
|
# sign_file="/path/to/sign-file"
|
||||||
# sign_tool="/etc/dkms/sign_helper.sh"
|
|
||||||
|
# Location of the key and certificate used for Secure boot (default: /var/lib/dkms):
|
||||||
|
# mok_signing_key: /var/lib/dkms/mok.key
|
||||||
|
# mok_certificate: /var/lib/dkms/mok.pub
|
||||||
|
|
||||||
# Automatically modprobe the built modules upon succesful installation:
|
# Automatically modprobe the built modules upon succesful installation:
|
||||||
modprobe_on_install="true"
|
modprobe_on_install="true"
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
/lib/modules/"$1"/build/scripts/sign-file sha512 /root/dkms.key /root/dkms.der "$2"
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [[ "$1" == "add" ]]; then
|
if [ "$1" = "add" ]; then
|
||||||
/etc/kernel/postinst.d/dkms $2
|
/etc/kernel/postinst.d/dkms "$2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "remove" ]]; then
|
if [ "$1" = "remove" ]; then
|
||||||
/etc/kernel/prerm.d/dkms $2
|
/etc/kernel/prerm.d/dkms "$2"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# We're passed the version of the kernel being installed
|
# We're passed the version of the kernel being installed
|
||||||
inst_kern=$1
|
inst_kern=$1
|
||||||
@@ -11,17 +11,16 @@ _get_kernel_dir() {
|
|||||||
Linux) DIR="/lib/modules/$KVER/build" ;;
|
Linux) DIR="/lib/modules/$KVER/build" ;;
|
||||||
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
|
GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
|
||||||
esac
|
esac
|
||||||
echo $DIR
|
echo "$DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
_check_kernel_dir() {
|
_check_kernel_dir() {
|
||||||
DIR=$(_get_kernel_dir $1)
|
DIR=$(_get_kernel_dir "$1")
|
||||||
case ${uname_s} in
|
case ${uname_s} in
|
||||||
Linux) test -e $DIR/include ;;
|
Linux) test -e "$DIR/include" ;;
|
||||||
GNU/kFreeBSD) test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
|
GNU/kFreeBSD) test -e "$DIR/kern" && test -e "$DIR/conf/kmod.mk" ;;
|
||||||
*) return 1 ;;
|
*) false ;;
|
||||||
esac
|
esac
|
||||||
return $?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${uname_s}" in
|
case "${uname_s}" in
|
||||||
@@ -36,10 +35,10 @@ case "${uname_s}" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
|
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
|
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 "dkms: WARNING: $kernel headers are missing, which may explain the above failures." >&2
|
||||||
echo " please install the $header_pkg package to fix this." >&2
|
echo " please install the $header_pkg package to fix this." >&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# We're passed the version of the kernel being removed
|
# We're passed the version of the kernel being removed
|
||||||
inst_kern=$1
|
inst_kern=$1
|
||||||
|
|
||||||
if [ -x /usr/sbin/dkms ]; then
|
if command -v dkms > /dev/null; then
|
||||||
while read line; do
|
dkms status -k "$inst_kern" 2>/dev/null | while IFS=",:/ " read -r name vers _ arch status; do
|
||||||
name=`echo "$line" | awk '{print $1}' | sed 's/,$//' | cut -d'/' -f1`
|
[ "$status" = "installed" ] || continue
|
||||||
vers=`echo "$line" | awk '{print $1}' | sed 's/,$//' | cut -d'/' -f2`
|
|
||||||
arch=`echo "$line" | awk '{print $3}' | sed 's/:$//'`
|
|
||||||
echo "dkms: removing: $name $vers ($inst_kern) ($arch)" >&2
|
echo "dkms: removing: $name $vers ($inst_kern) ($arch)" >&2
|
||||||
dkms remove -m $name -v $vers -k $inst_kern -a $arch
|
dkms remove -m "$name" -v "$vers" -k "$inst_kern" -a "$arch"
|
||||||
done < <(dkms status -k $inst_kern 2>/dev/null | grep ": installed")
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rmdir --ignore-fail-on-non-empty \
|
rmdir --ignore-fail-on-non-empty \
|
||||||
|
|||||||
Reference in New Issue
Block a user