Subversion Repositories livecd

Rev

Rev 7 | Blame | Last modification | View Log | Download | RSS feed

#!/bin/bash
#
# Fix things during bootup - run very first 
# Executed at the begining of /etc/rc.d/rc.sysinit
#
# Urs Beyerle, PSI
#

### definitions

# dir of mounted /$MOUNTDIR/live
MOUNTDIR=livecd

# source functions
. /$MOUNTDIR/live/liblinuxlive
. /etc/init.d/functions

### get boot parameters

# root on NFS?
NFSROOT=$( cmdline_value nfsroot )


### put wireless kernel module on blacklist, if boot over NFS
#   we don't need to load wireless modules, if we boot over network 
if [ $NFSROOT ]; then
    echo "Disable probing for wireless modules on diskless client"
    cp -a /etc/hotplug/blacklist /etc/hotplug/blacklist.backup
    echo >> /etc/hotplug/blacklist
    echo "# Disable wireless modules on diskless client" >> /etc/hotplug/blacklist

    find /lib/modules/$( uname -r )/kernel/drivers/net/wireless -type f | grep -v "_" | while read module; do 
         basename $module | cut -d"." -f 1
    done >> /etc/hotplug/blacklist
fi