Rev 267 | Blame | Compare with Previous | 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#### definitions# dir of mounted /$MOUNTDIR/liveMOUNTDIR=livecd# source functions. /$MOUNTDIR/live/liblinuxlive. /etc/init.d/functions### get boot parameters# root on NFS?NFSROOT=$( cmdline_value nfsroot )# kernel modules for blacklist?BLACKLIST=$( cmdline_value blacklist )# disable udev hotplug?NOHOTPLUG=$( cmdline_parameter nohotplug )### create /srv and /selinuxmkdir -p /srvmkdir -p /selinux### blacklist file[ -e /etc/hotplug/blacklist ] && BLACKLIST_FILE=/etc/hotplug/blacklist[ -e /etc/modprobe.d/blacklist ] && BLACKLIST_FILE=/etc/modprobe.d/blacklist[ -e /etc/modprobe.d/blacklist.conf ] && BLACKLIST_FILE=/etc/modprobe.d/blacklist.conf### put wireless kernel module on blacklist, if boot over NFS# we don't need to load wireless modules, if we boot over networkif [ $NFSROOT ]; thenecho "Disable probing for wireless modules on diskless client"cp -a ${BLACKLIST_FILE} ${BLACKLIST_FILE}.oriecho >> ${BLACKLIST_FILE}echo "# Disable wireless modules on diskless client" >> ${BLACKLIST_FILE}# for SL4if [ -e /etc/hotplug/blacklist ]; thenfind /lib/modules/$( uname -r )/kernel/drivers/net/wireless -type f | grep -v "_" | while read module; dobasename $module | cut -d"." -f 1done >> ${BLACKLIST_FILE}fi# for SL5if [ -e /etc/modprobe.d/blacklist ]; thenfind /lib/modules/$( uname -r )/kernel/drivers/net/wireless -type f | grep -v "_" | while read module; doecho -n "blacklist "; basename $module | cut -d"." -f 1done >> ${BLACKLIST_FILE}fifi### blacklist kernel modulesif [ -n $BLACKLIST ]; thencp -a ${BLACKLIST_FILE} ${BLACKLIST_FILE}.oriecho "# Added by boot parameter (LiveCD)" >> ${BLACKLIST_FILE}for module in `echo "$BLACKLIST" | tr ':' ' '`; doecho "blacklist $module" >> ${BLACKLIST_FILE}doneecho >> ${BLACKLIST_FILE}fi### disable udev hotplug - may make the system unusable[ -e /lib/udev/udev_run_hotplugd ] && HOTPLUG_FILE=/lib/udev/udev_run_hotplugd # SL5if [ $NOHOTPLUG ] && [ $HOTPLUG_FILE ]; thenmv ${HOTPLUG_FILE} ${HOTPLUG_FILE}.oritouch ${HOTPLUG_FILE}chmod 755 ${HOTPLUG_FILE}fi