Files
webgui/etc/rc.d/rc.modules.local
T
Tom Mortensen f9ec00b488 repo reorg
2023-06-02 12:49:33 -07:00

27 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# /etc/rc.d/rc.modules.local
# The Linux kernel source is the best place to look for documentation
# for the many available kernel modules. This can be found under
# /usr/src/linux-$VERSION/Documentation/.
# Almost all necessary modules are automatically loaded when needed,
# but there are a few exceptions. Here's a (not all-inclusive) list,
# so uncomment any of the below entries or add others as needed:
# Note that you could also create/edit rc.modules-$version if you
# only wanted specific modules loaded for particular kernels.
#/sbin/modprobe tun # Universal TUN/TAP device driver
#/sbin/modprobe sg # Generic SCSI support for SATA DVD-RW
# limetech - set default zfs arc size to 1/8 total memory
# (MemTotal is reported in units of 1024, SIZE needs to be bytes)
SIZE=$(awk '/MemTotal/{print $(NF-1)*128}' /proc/meminfo)
echo "options zfs zfs_arc_max=$SIZE" > /etc/modprobe.d/zfs.conf
# limetech - grab any user defined module conf files
if [ -d /boot/config/modprobe.d ]; then
/usr/bin/find /boot/config/modprobe.d -type f -exec install -p -m 0644 {} /etc/modprobe.d \;
fi