diff --git a/Makefile b/Makefile index f878d8f..c16ca48 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ BRIEF = Kernel module tools DESC = kmod is a set of tools to handle common tasks with Linux kernel \ modules like insert, remove, list, check properties, resolve dependencies \ and aliases. -SNAPVER = 2 +SNAPVER = 3 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) 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/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: @rm -rvf $(ROOT) \ $(SNAPINFO) \ diff --git a/SNAP/blacklist.conf b/SNAP/blacklist.conf new file mode 100644 index 0000000..53db3fc --- /dev/null +++ b/SNAP/blacklist.conf @@ -0,0 +1,2 @@ +blacklist pcspkr +blacklist cirrusfb diff --git a/SNAP/usb.conf b/SNAP/usb.conf new file mode 100644 index 0000000..2131c0e --- /dev/null +++ b/SNAP/usb.conf @@ -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 diff --git a/SNAP/usher b/SNAP/usher new file mode 100755 index 0000000..4fdbd07 --- /dev/null +++ b/SNAP/usher @@ -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