Subversion Repositories livecd

Rev

Rev 169 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 169 Rev 259
Line 13... Line 13...
13
 
13
 
14
# source functions
14
# source functions
15
. /$MOUNTDIR/live/liblinuxlive
15
. /$MOUNTDIR/live/liblinuxlive
16
. /etc/init.d/functions
16
. /etc/init.d/functions
17
 
17
 
-
 
18
 
18
### get boot parameters
19
### get boot parameters
19
 
20
 
20
# root on NFS?
21
# root on NFS?
21
NFSROOT=$( cmdline_value nfsroot )
22
NFSROOT=$( cmdline_value nfsroot )
22
 
23
 
-
 
24
# kernel modules for blacklist?
-
 
25
BLACKLIST=$( cmdline_value blacklist )
-
 
26
 
-
 
27
# disable udev hotplug?
-
 
28
NOHOTPLUG=$( cmdline_parameter nohotplug )
-
 
29
 
23
 
30
 
24
### create /srv and /selinux
31
### create /srv and /selinux
25
mkdir -p /srv
32
mkdir -p /srv
26
mkdir -p /selinux
33
mkdir -p /selinux
27
 
34
 
28
 
35
 
-
 
36
### blacklist file
-
 
37
[ -e /etc/hotplug/blacklist ]    && BLACKLIST_FILE=/etc/hotplug/blacklist
-
 
38
[ -e /etc/modprobe.d/blacklist ] && BLACKLIST_FILE=/etc/modprobe.d/blacklist
-
 
39
 
-
 
40
 
29
### put wireless kernel module on blacklist, if boot over NFS
41
### put wireless kernel module on blacklist, if boot over NFS
30
#   we don't need to load wireless modules, if we boot over network 
42
#   we don't need to load wireless modules, if we boot over network 
31
if [ $NFSROOT ]; then
43
if [ $NFSROOT ]; then
32
    [ -e /etc/hotplug/blacklist ] && BLACKLIST_FILE=/etc/hotplug/blacklist
-
 
33
    [ -e /etc/modprobe.d/blacklist ] && BLACKLIST_FILE=/etc/modprobe.d/blacklist
-
 
34
 
44
 
35
    echo "Disable probing for wireless modules on diskless client"
45
    echo "Disable probing for wireless modules on diskless client"
36
    cp -a ${BLACKLIST_FILE} ${BLACKLIST_FILE}.backup
46
    cp -a ${BLACKLIST_FILE} ${BLACKLIST_FILE}.ori
37
    echo >> ${BLACKLIST_FILE}
47
    echo >> ${BLACKLIST_FILE}
38
    echo "# Disable wireless modules on diskless client" >> ${BLACKLIST_FILE}
48
    echo "# Disable wireless modules on diskless client" >> ${BLACKLIST_FILE}
39
 
49
 
40
    # for SL4
50
    # for SL4
41
    if [ -e /etc/hotplug/blacklist ]; then
51
    if [ -e /etc/hotplug/blacklist ]; then
Line 50... Line 60...
50
	    echo -n "blacklist "; basename $module | cut -d"." -f 1
60
	    echo -n "blacklist "; basename $module | cut -d"." -f 1
51
	done >> ${BLACKLIST_FILE}
61
	done >> ${BLACKLIST_FILE}
52
    fi
62
    fi
53
fi
63
fi
54
 
64
 
-
 
65
 
-
 
66
### blacklist kernel modules
-
 
67
if [ -n $BLACKLIST ]; then
-
 
68
    cp -a ${BLACKLIST_FILE} ${BLACKLIST_FILE}.ori
-
 
69
    for module in `echo "$BLACKLIST" | tr ':' ' '`; do
-
 
70
	echo $module >> ${BLACKLIST_FILE}
-
 
71
    done
-
 
72
fi
-
 
73
 
-
 
74
 
-
 
75
### disable udev hotplug - may make the system unusable
-
 
76
[ -e /lib/udev/udev_run_hotpluged ] && HOTPLUG_FILE=/lib/udev/udev_run_hotpluged   # SL5
-
 
77
 
-
 
78
if [ $NOHOTPLUG ] && [ $HOTPLUG_FILE ]; then
-
 
79
    mv ${HOTPLUG_FILE} ${HOTPLUG_FILE}.ori
-
 
80
    touch ${HOTPLUG_FILE}
-
 
81
    chmod 755 ${HOTPLUG_FILE}
-
 
82
fi