File: module-setup.sh

package info (click to toggle)
driverctl 0.121-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 140 kB
  • sloc: sh: 365; makefile: 47
file content (34 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (4)
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
33
34
#!/bin/bash

driverctl_dir=/etc/driverctl.d/

check()
{
    return 0
}

depends()
{
    return 0
}

installkernel()
{
    for f in ${driverctl_dir}/*; do
        mods=""
        if [ -s ${f} ]; then
            mod=$(cat ${f})
            mods="${mods} ${mod}"

            # hack, but this doesn't get automatically pulled in
            [ "${mod}"="vfio-pci" ] && mods="${mods} vfio-iommu-type1"
        fi
    done
    [ -n "$mods" ] && hostonly="" instmods $mods
}

install()
{
    inst_rules 05-driverctl.rules 89-vfio-uio.rules
    inst_multiple ${driverctl_dir}/* /usr/sbin/driverctl /usr/lib/udev/vfio_name /usr/bin/logger
}