#!/bin/bash
#
# This file loads extra drivers into the Linux kernel.
#
# (Some kind of copyright notice:  Original version of this file was
# taken from Slackware 11.0 and heavily modified for Tukaani.)
#
# The modules will be looked for under /lib/modules/<kernel_version_number>.
# On systems using KMOD and udev this file should remain mostly commented
# out.  Nearly all hardware device modules will be loaded  automatically
# on such systems.  This file should only be used when udev is not
# loading a module that you require, or if you are not using udev (which
# is going to become increasingly impossible...), or if you want to force
# a particular module to be loaded where alternatives exist.
#
# Many Linux kernel modules will accept extra options.  The Linux kernel
# source is the best place to look for extra documentation for the various
# modules.  This can be found under /usr/share/doc/linux-*/Documentation
# if you've the installed the kernel-docs package.
#
# NOTE:  This may not be a complete list of modules.  If you don't see what
# you're looking for, look around in /lib/modules/2.x.x/ for an appropriate
# module.  Also, if any problems arise loading or using these modules, try
# compiling and installing a custom kernel that contains the support instead.
# That always works. ;^)

[[ ! $HAVE_RC_FUNCTIONS ]] && . /etc/rc.d/rc.functions

### Update module dependencies ###
# On properly configured systems there is no need slow down boot with this,
# but let's keep the example command still around.
#echo "Updating module dependencies."
#depmod -A

### Mouse support:
# PS/2 mouse support:
# The default in Slackware is to use proto=imps because that works with the
# most types of mice out of the box.  For example, using proto=any will
# completely break the mouse if you change consoles with several models of KVM
# switches.
modprobe psmouse proto=imps
#
# Serial (RS-232, COM port) mouse support:
#modprobe sermouse
#
# IBM PC110 palmtop digitizer pad:
#modprobe pc110pad

#### Power management
# There are two interfaces for power management: APM (Advanced Power
# Management) and ACPI (Advanced Configuration and Power Interface).
# APM is mostly useful for older battery powered laptops that do not
# support ACPI.
#modprobe apm
#
# Nowadays ACPI has superseded APM. Support for ACPI is built statically
# into all the pre-packaged kernels. If it causes problems, it can be
# disabled by adding "acpi=off" as a kernel argument (the "append" line
# in lilo.conf).

# Enable PC speaker support:
modprobe pcspkr

### Built-in PC parallel port support ###
# This is loaded by default since is usually doesn't hurt. If the kernel
# does not have PnP-BIOS support (or it does not work), you may want to
# manually set DMA and IRQ to get better performance.
modprobe -q parport_pc
#
# Hardware specific setup example (PLIP requires an IRQ, and the ECP
# protocol requires a DMA channel) This may also give better performance
# in general. Usually these are autodetected if the kernel has been built
# with support for PnP-BIOS.
#modprobe parport_pc io=0x378 irq=7 dma=1

### Parallel printer support ###
# This should be safe to try to load by default.
modprobe -q lp

### Filesystem Quota support ###
if egrep -wq '(usr|grp)quota' /etc/fstab; then
	# modprobe quota_v1
	modprobe quota_v2
fi

### AGP (Accelerated Graphics Port) GART support ###
# This module takes care of programming the GART (part of your motherboard's
# chipset that handles gathering data from memory and passing it to the
# card) and enables faster AGP transfers.  The AGP GART module is required
# to use AGP features of your 3D rendering video card.  You'll need this to
# with most cards (nVidia's official drivers that include their own GART
# support being a notable exception) to use X11's direct rendering support.
modprobe agpgart

## Load PPP:
# This module is for PPP support:
#modprobe ppp_generic
# This PPP plugin supports PPP over serial lines:
#modprobe ppp_async
# Use this plugin instead for HDLC (used for high-speed leased lines like T1/E1)
#modprobe ppp_synctty
# This module provides compression for PPP (optional):
#modprobe ppp_deflate

### USB device support:
# (Note that once you've loaded USB hub support most USB devices will
# trigger the kernel to load their modules automatically)
# USB "Human Interface Device" driver; handles most USB mice, joysticks,
# gamepads, steering wheels, keyboards, trackballs and digitizers.
#modprobe usbhid
# Wacom Graphire and Intuos tablet driver:
#modprobe wacom
# Logitech WingMan Force joystick:
#modprobe iforce
# USB audio:
#modprobe audio
# USB serial converter:
#modprobe usbserial
# USB printer support:
#modprobe usblp 
# IBM "C-It" USB video camera:
#modprobe ibmcam framerate=1
# USB OV511 Camera support:
#modprobe ov511
# USB ADMtek Pegasus-based ethernet device support:
#modprobe pegasus
# Kawasaki USB ethernet controller support:
#modprobe kaweth
# USB Mustek MDC800 Digital Camera Support:
#modprobe mdc800
# USB Mass Storage support:
#modprobe usb-storage
# USS720 parallel-port driver:
#modprobe uss720
# Prolific PL-2302 USB-to-USB network device:
#modprobe plusb
# USB Diamond Rio500 support:
#modprobe rio500
# D-Link DSB-R100 FM radio support:
#modprobe dsbr100
# USB Bluetooth support:
#modprobe bluetooth

### USB event drivers:
# Mouse input:
#modprobe mousedev
# Joystick input:
#modprobe joydev
# Generic event reporting device:
modprobe evdev

### ALSA (Advanced Linux Sound Architecture) support: 
# Sound Blaster Pro/16 support:
#modprobe snd-sb16 port=0x220 irq=5 dma8=3 dma16=5 mpu_port=0x300
# Sound Blaster Live support:
#modprobe snd-emu10k1
# AD1816(A) sound driver:
#modprobe snd-ad1816a port=0x530 irq=5 dma1=1 dma2=3
# Crystal CS4232 based (PnP) cards:
#modprobe snd-cs4232
# ES1370 (Ensoniq AudioPCI ES1370) support.  This is for some Creative
# Labs Sound Blaster PCI64/128 (that use the ES1370 chipset), and
# Ensoniq AudioPCI-97:
#modprobe snd-ens1370
# ES1371 (Ensoniq AudioPCI ES1371/73) support.  This is for some Creative
# Labs Sound Blaster PCI64/128 (that use the ES1371/73 chipset), Ectiva
# EV1938, Vibra PCI128, and Ensoniq AudioPCI ES1371/73:
#modprobe snd-ens1371
# ESS Maestro, Maestro2, Maestro2E:
#modprobe snd-es1968 
# ESS Maestro3/Allegro:
#modprobe snd-maestro3
# VIA VT82xx Audio Controller
#modprobe snd-via82xx
# (For information on configuring other sound cards with Linux,
# see the documentation in /usr/share/doc/linux-*/Documentation/sound/,
# and /usr/share/doc/linux-*/Documentation/Configure.help.

### Joystick support ###
# The core joystick input support module, needed by all of the
# joystick devices below:
#modprobe joydev
### Next, you must load a module for your gameport.
# Classic ISA/PnP gameports:
#modprobe ns558
# SoundBlaster Live! gameports:
#modprobe emu10k1-gp
# Many soundcards had their gameport support bundled in sound drivers
### Drivers for various joystick devices ###
# Analog joysticks and gamepads:
#modprobe analog
# Assassin 3D and MadCatz Panther devices:
#modprobe a3d
# Logitech ADI digital joysticks and gamepads:
#modprobe adi
# Creative Labs Blaster Cobra gamepad:
#modprobe cobra
# Genius Flight2000 Digital joysticks and gamepads:
#modprobe gf2k
# Gravis GrIP joysticks and gamepads:
#modprobe grip
# InterAct digital joysticks and gamepads:
#modprobe interact
# ThrustMaster DirectConnect joysticks and gamepads:
#modprobe tmdc
# Microsoft SideWinder digital joysticks and gamepads:
#modprobe sidewinder
### Serial port game controller support ###
# Both of these are needed for serial-port game controllers:
#modprobe serio
#modprobe serport
# Logitech WingMan Warrior joystick:
#modprobe warrior
# LogiCad3d Magellan/SpaceMouse 6dof controller:
#modprobe magellan
# SpaceTec SpaceOrb/Avenger 6dof controller:
#modprobe spaceorb
# SpaceTec SpaceBall 4000 FLX 6dof controller:
#modprobe spaceball
# Gravis Stinger gamepad:
#modprobe stinger
# I-Force joysticks/wheels:
#modprobe iforce
### Parallel port connected controllers ###
# Multisystem, Sega Genesis, Saturn joysticks and gamepads:
#modprobe db9
# Multisystem, NES, SNES, N64, PSX joysticks and gamepads:
#modprobe gamecon
# Multisystem joysticks via TurboGraFX device:
#modprobe turbografx

### IDE device support ###
# IDE CD-ROM drives:
#modprobe ide-cd
# IDE hard drives:
#modprobe ide-disk
# IDE floppy drives:
#modprobe ide-floppy
# IDE tape drives:
#modprobe ide-tape

### Network device support ###
# Most of these drivers will probe automatically for the card if you don't
# specify an I/O address and IRQ.  
#
# First, if setup probing found a network card, there may be an 'rc.netdevice'
# file that we should run to load the network module:
rc netdevice start

### Ethernet cards based on the 8390 chip.
# 3com 3c503 support:
#modprobe 3c503 
# Ansel Communications EISA 3200 support:
#modprobe ac3200
# Cabletron E21xx support:
#modprobe e2100
# HP PCLAN+ (27247B and 27252A) support:
#modprobe hp-plus
# HP PCLAN (27245 and other 27xxx series) support:
#modprobe hp
# NE2000/NE1000 support (non PCI):
#modprobe ne io=0x300 # NE2000 at 0x300
#modprobe ne io=0x280 # NE2000 at 0x280
#modprobe ne io=0x320 # NE2000 at 0x320
#modprobe ne io=0x340 # NE2000 at 0x340
#modprobe ne io=0x360 # NE2000 at 0x360
# PCI NE2000 clone support:
#modprobe ne2k-pci
# SMC Ultra support:
#modprobe smc-ultra
# SMC Ultra32 EISA support:
#modprobe smc-ultra32
# Western Digital WD80*3 (and clones) support:
#modprobe wd
#
# Other network hardware drivers:
# 
# 3com 3c503:
#modprobe 3c503
# 3com 3c505:
#modprobe 3c505
# 3com 3c507:
#modprobe 3c507
# 3com 3c509 and 3c579:
#modprobe 3c509
# 3com 3c515:
#modprobe 3c515
# This one works for all 3com 3c590/3c592/3c595/3c597 and the
# EtherLink XL 3c900 and 3c905 cards:
#modprobe 3c59x
# Apricot Xen-II on board Ethernet:
#modprobe apricot
# Generic ARCnet support:
#modprobe arcnet
# AT1700/1720 & Fujitsu FMV-181/182/183/184 support:
#modprobe at1700
# AT-LAN-TEC/RealTek pocket adapter support:
#modprobe atp
# BPQ Ethernet driver:
#modprobe bpqether
# Generic DECchip & DIGITAL EtherWORKS PCI/EISA:
#modprobe de4x5
# D-Link DE600 pocket adapter support:
#modprobe de600
# D-Link DE620 pocket adapter support:
#modprobe de620
# DEPCA support:
#modprobe depca
# Digi International RightSwitch cards:
#modprobe dgrs
# Intel EtherExpress Pro support:
#modprobe eepro
# Intel EtherExpress PRO/100 PCI support:
#modprobe eepro100
# Intel EtherExpress16 support:
#modprobe eexpress
# SMC EtherPower II 9432 PCI support:
#modprobe epic100
# ICL EtherTeam 16i/32 support:
#modprobe eth16i
# DEC EtherWorks 3 support:
#modprobe ewrk3
# HP 10/100VG PCLAN (ISA, EISA, PCI) support:
#modprobe hp100
# IBM Tropic chipset based adapter support:
#modprobe ibmtr
# AMD LANCE and PCnet (AT1500 and NE2100) support:
#modprobe lance
# National Semiconductor DP8381x series PCI Ethernet support:
#modprobe natsemi
# NI5210 support:
#modprobe ni52
# NI6510 support:
#modprobe ni65
# AMD PCnet32 (VLB and PCI) support:
#modprobe pcnet32
# Red Creek Hardware Virtual Private Network (VPN) support:
#modprobe rcpci
# RealTek 8129/8139 (not 8019/8029!) support:
#modprobe 8139too
# RealTek 8139C+ enhanced support:
#modprobe 8139cp
# Sangoma S502A FRAD support:
#modprobe sdla
# SMC 9194 support:
#modprobe smc9194
# TI ThunderLAN support:
#modprobe tlan
# DECchip Tulip (dc21x4x) PCI support:
#modprobe tulip
# VIA Rhine support:
#modprobe via-rhine
# AT&T WaveLAN & DEC RoamAbout DS support:
#modprobe wavelan
# Packet Engines Yellowfin Gigabit-NIC support:
#modprobe yellowfin
# Davicom DM9xxx (9102/9132/9100/9802...)
#modprobe dmfe
# SiS 900/7016 PCI Fast Ethernet
#modprobe sis900

### Serial line load balancing support ###
#modprobe eql

### "dummy" IP support ###
# A dummy IP driver.  Essentially a loopback device.  Can be useful --
# see the Network Administrator's Guide from sunsite.unc.edu:/pub/Linux/docs/LDP
#modprobe dummy

### RAID (Multiple Devices) support ###
#modprobe linear
#modprobe raid0
#modprobe raid1
#modprobe raid5

### SCSI kernel support:
#modprobe scsi_mod
#modprobe scsi_syms
#modprobe sd_mod
#modprobe sg
#modprobe sr_mod
#modprobe st

### SCSI controller support:
# NCR53c7xx SCSI support: 
#modprobe 53c7xx
# BusLogic MultiMaster and FlashPoint SCSI support:
#modprobe BusLogic
# NCR53c406a SCSI support:
#modprobe NCR53c406a
# Initio INI-A100U2W SCSI support:
#modprobe a100u2w
# AdvanSys SCSI support:
#modprobe advansys 
# Adaptec AHA152X/2825 support:
#modprobe aha152x
# Adaptec AHA1542 support:
#modprobe aha1542
# Adaptec AHA1740 support:
#modprobe aha1740
# This is support for the various aic7xxx based Adaptec SCSI
# controllers. These include the 274x EISA cards; 284x VLB cards;
# 2902, 2910, 293x, 294x, 394x, 3985 and several other PCI and
# motherboard based SCSI controllers from Adaptec:
#modprobe aic7xxx
# ACARD 870U/W SCSI support:
#modprobe atp870u
# DTC 3180/3280 SCSI support:
#modprobe dtc
# EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support:
#modprobe eata
# EATA-PIO (old DPT PM2001, PM2012A) support:
#modprobe eata_pio
# Future Domain 16xx SCSI/AHA-2920A support:
#modprobe fdomain
# Generic NCR5380/53c400 SCSI support:
#modprobe g_NCR5380
# GDT SCSI Disk Array Controller support:
#modprobe gdth
# IOMEGA parallel port (imm - newer drives like ZipPlus):
#modprobe imm
# Always IN2000 SCSI support:
#modprobe in2000
# Initio 91XXU(W) SCSI support:
#modprobe initio
# LSI Logic MegaRAID support (new driver):
#modprobe megaraid_mbox
# LSI Logic MegaRAID support (legacy driver):
#modprobe megaraid
# NCR53C8XX SCSI support:
#modprobe sym53c8xx
# PAS16 SCSI support:
#modprobe pas16
# IOMEGA parallel port (ppa - older parallel Zip drives):
#modprobe ppa
# PSI240i support:
#modprobe psi240i
# Qlogic FastSCSI! cards:
#modprobe qlogicfas
# QLogic ISP2100 SCSI support:
#modprobe qlogicfc
# Seagate ST-02 and Future Domain TMC-8xx SCSI support:
#modprobe seagate
# Symbios Logic sym53c416 support:
#modprobe sym53c416
# Trantor T128/T128F/T228 SCSI support:
#modprobe t128
# Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support:
#modprobe tmscsim
# UltraStor 14F and 34F support (also see driver below):
#modprobe u14-34f
# UltraStor 14F, 24F, and 34F support:
#modprobe ultrastor
# Western Digital 7000 SCSI support:
#modprobe wd7000

### Floppy drive support:
# (Most Linux kernels should already contain this)
#modprobe floppy

### Floppy tape support (such as Colorado Jumbo 250 or other QIC-80 drives):
#modprobe ftape

### IP masquerading modules:
# These modules are used with IP masquerading, a process which allows you to
# use a Linux box connected to the Internet as a gateway for other computers
# on your local network that don't have real IP addresses on the Internet.
# The packets going through the Linux machine are "masqueraded", or made to
# look as if they're all coming from the one real IP address on the Internet.
#
# As a quick example (for a much more extensive treatment, see the IP-Masquerade
# mini-HOWTO) to allow Internet access to a local network 192.168.11.0 with a
# netmask of 255.255.255.0, you'd use these commands in /etc/rc.d/rc.local:
#
#  # EXTERNAL -> external network interface 
#  # INTERNAL -> internal network interface
#  EXTERNAL=eth0
#  INTERNAL=eth1
#  echo 1 > /proc/sys/net/ipv4/ip_forward
#  echo "Setting up NAT (Network Address Translation)..."
#  # by default, nothing is forwarded.
#  iptables -P FORWARD DROP
#  # Allow all connections OUT and only related ones IN
#  iptables -A FORWARD -i $EXTERNAL -o $INTERNAL -m state --state ESTABLISHED,RELATED -j ACCEPT
#  iptables -A FORWARD -i $INTERNAL -o $EXTERNAL -j ACCEPT
#  # enable MASQUERADING
#  iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE
#
# Then you'd have to set the other boxes on your local network to use the
# Linux machine as their TCP/IP gateway.  You'll probably also need to plug
# in the IP address for your Internet service provider in each machine's DNS
# setup, or use DNS proxy like dnsmasq (recommended).
#
# Now, on to the IP masquerading modules.  The example above is good enough
# for most things that use TCP in a relatively simple fashion.  It'll work
# for SSH and HTTP, for instance.  But, the system breaks down when you
# get protocols that use ports in more complicated ways.  Luckily the Linux
# kernel gurus have thought of this and have prepared some modules that
# support masquerading of trickier protocols. 
#
# Connection tracking for IPv4:
#modprobe nf_conntrack_ipv4
# Handlers for specific protocols (for iptables -m state --state ESTABLISHED):
#modprobe nf_conntrack_ftp
#modprobe nf_conntrack_h323
#modprobe nf_conntrack_irc
#modprobe nf_conntrack_sip
#modprobe nf_conntrack_tftp
# NAT helpers for specific protocols (for iptables -t nat):
#modprobe nf_nat_ftp
#modprobe nf_nat_h323
#modprobe nf_nat_irc
#modprobe nf_nat_sip
#modprobe nf_nat_tftp

### Kernel security models:
# Default Linux Capabilities
# This enables the "default" Linux capabilities functionality, so
# the module will be loaded by default if it looks like we are
# running a new enough kernel:
[ ! -f /proc/sys/kernel/cap-bound ] && modprobe capability

### FUSE (File system in user space) support:
# This is needed to use e.g. SSHFS, CurlFtpFS, or NTFS-3G.
modprobe fuse

# Accelerator module for QEMU:
#modprobe kqemu
