blob: 8af5d90df6e33ec8605a617ebe7459ced916df68 (
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
|
#!/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:
|