Subversion Repositories livecd

Rev

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

#!/bin/bash
#
# Noninteractive HW detection and configuration
#
# Urs Beyerle, PSI
#

### -----------------------------------------------------------
### definitions
### -----------------------------------------------------------

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

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


### -----------------------------------------------------------
### Get boot parameters
### -----------------------------------------------------------

# do not start network
NONET=$( cmdline_parameter nonet )


### -----------------------------------------------------------
### Main
### -----------------------------------------------------------

# run kudzu in quiet mode
action $"Hardware auto-detection, please wait... " /usr/sbin/kudzu -q

# disable start network devices, if NONET is defined
if [ $NONET ]; then
    for iface in eth0 eth1 eth2 eth3; do
        for file in networking/profiles/default/ifcfg \
                    networking/devices/ifcfg \
                    network-scripts/ifcfg; do
          if [ -e /etc/sysconfig/${file}-${iface} ]; then
              sed -i "s/ONBOOT=.*/ONBOOT=no/" /etc/sysconfig/${file}-${iface}
          fi
        done
    done
fi