diff options
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | modprobe-blacklist | 25 | ||||
-rw-r--r-- | rc.conf | 2 | ||||
-rwxr-xr-x | rc.sysinit | 3 |
4 files changed, 32 insertions, 3 deletions
@@ -1,5 +1,5 @@ VER := $(shell git describe) -DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin +DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin /etc/modprobe.d minilogd: minilogd.o @@ -12,7 +12,8 @@ install: minilogd installdirs install -m755 -t $(DESTDIR)/etc/cron.hourly adjtime install -m644 -t $(DESTDIR)/etc/rc.d functions install -m755 -t $(DESTDIR)/etc/rc.d hwclock network netfs - install -m755 -t $(DESTDIR)/sbin minilogd rc.d + install -m755 -t $(DESTDIR)/sbin minilogd rc.d modprobe-blacklist + ln -s /run/initscripts/modprobe-blacklist.conf $(DESTDIR)/etc/modprobe.d/arch-blacklist.conf clean: rm -f minilogd minilogd.o diff --git a/modprobe-blacklist b/modprobe-blacklist new file mode 100755 index 0000000..8af5d90 --- /dev/null +++ b/modprobe-blacklist @@ -0,0 +1,25 @@ +#!/bin/bash +# +# /etc/rc.gen-modules-list +# + +. /etc/rc.conf + +declare -a blacklist +for mod in "${MODULES[@]}"; do + case $mod in + !*) blacklist+=("${mod:1}") ;; + *) ;; + esac +done + +# create new module blacklist in /run/initscripts, there should be a symlink in /etc/modprobe.d/ pointing here +if [[ $blacklist ]]; then + /bin/mkdir -p /run/initscripts + echo "# Autogenerated from rc.conf at boot, do not edit" > /run/initscripts/modprobe-blacklist.conf + (( ${#blacklist[@]} )) && printf 'blacklist %s\n' "${blacklist[@]}" >> /run/initscripts/modprobe-blacklist.conf +fi + +unset blacklist + +# vim: set noet ts=2 sw=2: @@ -36,7 +36,7 @@ VERBOSE="3" # MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed # MODULES: Modules to load at boot-up. Prefix with a ! to blacklist. # -MOD_AUTOLOAD="yes" +MOD_AUTOLOAD="yes" # (DEPRECATED) always leave at "yes" MODULES=() # Udev settle timeout (default to 30) @@ -83,6 +83,9 @@ if [[ $HWCLOCK_PARAMS ]]; then fi fi +# parse rc.conf and create the blacklist file for use by modprobe +status "Creating UDev blacklist" /sbin/modprobe-blacklist + status "Starting UDev Daemon" /sbin/udevd --daemon run_hook sysinit_udevlaunched |