The following changes were made:

* /etc/modprobe.d added
  * blacklist.conf and usb.conf added
  * usher added to manage blacklist.conf and usb.conf
This commit is contained in:
2017-05-16 17:06:08 -05:00
parent cb39d79bc4
commit d3b33bbcca
4 changed files with 37 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ BRIEF = Kernel module tools
DESC = kmod is a set of tools to handle common tasks with Linux kernel \ DESC = kmod is a set of tools to handle common tasks with Linux kernel \
modules like insert, remove, list, check properties, resolve dependencies \ modules like insert, remove, list, check properties, resolve dependencies \
and aliases. and aliases.
SNAPVER = 2 SNAPVER = 3
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -74,6 +74,12 @@ $(ROOT): $(SRCDIR)/tools/kmod
ln -sv ../bin/kmod $(ROOT)/sbin/modprobe && \ ln -sv ../bin/kmod $(ROOT)/sbin/modprobe && \
ln -sv ../bin/kmod $(ROOT)/sbin/rmmod ln -sv ../bin/kmod $(ROOT)/sbin/rmmod
@install -v -d -m 755 $(ROOT)/etc/modprobe.d && \
install -v -d -m 755 $(ROOT)/usr/share/kmod && \
install -v -m 644 $(PWD)/SNAP/blacklist.conf \
$(ROOT)/usr/share/kmod/blacklist.conf && \
install -v -m 644 $(PWD)/SNAP/usb.conf $(ROOT)/usr/share/kmod/usb.conf
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \
$(SNAPINFO) \ $(SNAPINFO) \

2
SNAP/blacklist.conf Normal file
View File

@@ -0,0 +1,2 @@
blacklist pcspkr
blacklist cirrusfb

2
SNAP/usb.conf Normal file
View File

@@ -0,0 +1,2 @@
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true

26
SNAP/usher Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if [ ! -f ${TARGET}/etc/modprobe.d/blacklist.conf ]; then
cp ${TARGET}/usr/share/kmod/blacklist.conf \
${TARGET}/etc/modprobe.d/blacklist.conf
fi
if [ ! -f ${TARGET}/etc/modprobe.d/usb.conf ]; then
cp ${TARGET}/usr/share/kmod/usb.conf \
${TARGET}/etc/modprobe.d/usb.conf
fi
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac