blob: 8dea52cf0a7b3d11793f48f448da5384697c7590 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
MODULES=$(find /var/lib/dkms -mindepth 1 -maxdepth 1 -type d -exec basename {} \;)
post_install() {
local dkms_dir=/etc/dkms dkms_link= x=
local kernel_sign=${dkms_dir}/kernel-sign.conf
for x in $MODULES; do
dkms_link="$dkms_dir/$x.conf"
if [ ! -L $dkms_link ]; then
echo "Creating DKMS symlink: $kernel_sign => $dkms_link"
ln -sf $kernel_sign $dkms_link
fi
done
}
post_upgrade() {
post_install
}
post_remove() {
local dkms_dir=/etc/dkms dkms_link= x=
for x in $MODULES; do
dkms_link="$dkms_dir/$x.conf"
if [ -L $dkms_link ]; then
echo "Removing DKMS symlink: $dkms_link"
rm -f $dkms_link
fi
done
}
|