Subversion Repositories livecd

Rev

Rev 74 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74 Rev 78
Line 135... Line 135...
135
 
135
 
136
# kde/gnome as desktop
136
# kde/gnome as desktop
137
GNOME=$( cmdline_parameter gnome )
137
GNOME=$( cmdline_parameter gnome )
138
KDE=$( cmdline_parameter kde )
138
KDE=$( cmdline_parameter kde )
139
 
139
 
-
 
140
# do no fixes (useful for debugging)
-
 
141
NOFIX=$( cmdline_parameter nofix )
-
 
142
 
-
 
143
 
-
 
144
### -----------------------------------------------------------
-
 
145
### Functions
-
 
146
### -----------------------------------------------------------
-
 
147
 
-
 
148
reload_soundmodule() {
-
 
149
 
-
 
150
    ### unload/load sound module for snd-card-X (timing problem?)
-
 
151
    if [ ! $NOFIX ]; then
-
 
152
	rpm -q alsa-lib | grep el5 >/dev/null
-
 
153
	if [ "$?" = "0" ]; then
-
 
154
	    # disable kernel messages
-
 
155
	    echo "0" > /proc/sys/kernel/printk
-
 
156
	    sound_modules=$( grep snd-card- /etc/modprobe.conf | awk ' $1 ~ /alias/ { print $3 }' | tr - _ )
-
 
157
	    for module in $sound_modules; do
-
 
158
		lsmod | awk '{ print $1 }' | grep $module >/dev/null 2>&1
-
 
159
		if [ "$?" = "0" ]; then
-
 
160
		    rmmod $module    >/dev/null 2>&1
-
 
161
		    modprobe $module >/dev/null 2>&1
-
 
162
		fi
-
 
163
	    done
-
 
164
	    # enable kernel messages
-
 
165
	    echo "6" > /proc/sys/kernel/printk
-
 
166
	fi
-
 
167
    fi
-
 
168
}
-
 
169
 
140
 
170
 
141
### -----------------------------------------------------------
171
### -----------------------------------------------------------
142
### Improved hardware detection
172
### Improved hardware detection
143
### -----------------------------------------------------------
173
### -----------------------------------------------------------
144
 
174
 
145
### Improved graphic card detection?
175
### Improved graphic card detection
146
 
176
 
147
if [ ! $SIMPLEX ]; then
177
if [ ! $SIMPLEX ] && [ ! $NOFIX ]; then
148
 
178
 
149
    ### Intel Mobile 945GM
179
    ### Intel Mobile 945GM
150
    lspci | grep -q VGA.*Intel.*Mobile.*945GM
180
    lspci | grep -q VGA.*Intel.*Mobile.*945GM
151
    if [ "$?" = "0" ]; then
181
    if [ "$?" = "0" ]; then
152
	I945GM=i945gm
182
	I945GM=i945gm
Line 176... Line 206...
176
### -----------------------------------------------------------
206
### -----------------------------------------------------------
177
 
207
 
178
### try load fuse kernel module
208
### try load fuse kernel module
179
modprobe fuse 2>/dev/null
209
modprobe fuse 2>/dev/null
180
 
210
 
-
 
211
### reload sound module (first time)
-
 
212
reload_soundmodule
-
 
213
 
181
### activate SWAP
214
### activate SWAP
182
# delete all swap lines in fstab
215
# delete all swap lines in fstab
183
 sed -i -e "/ swap /d" /etc/fstab
216
 sed -i -e "/ swap /d" /etc/fstab
184
# search for swap partition
217
# search for swap partition
185
fdisk -l > /var/log/fdisk
218
fdisk -l > /var/log/fdisk
Line 611... Line 644...
611
    sed -i "s|.*ServerName .*|ServerName  $CUPS|" /etc/cups/client.conf
644
    sed -i "s|.*ServerName .*|ServerName  $CUPS|" /etc/cups/client.conf
612
fi
645
fi
613
 
646
 
614
### some magic: just access this file in order that it can be sourced later
647
### some magic: just access this file in order that it can be sourced later
615
ls -lag /etc/X11/xinit/xinitrc-common >/dev/null 2>&1
648
ls -lag /etc/X11/xinit/xinitrc-common >/dev/null 2>&1
616
sleep 1
-
 
617
 
649
 
618
### set keyboard for rdesktop
650
### set keyboard for rdesktop
619
if [ -e $XORG_CONF ]; then
651
if [ -e $XORG_CONF ]; then
620
    grep -q de_CH $XORG_CONF && RDESKTOP_OPT="-k de-ch"
652
    grep -q de_CH $XORG_CONF && RDESKTOP_OPT="-k de-ch"
621
    grep -q fr_CH $XORG_CONF && RDESKTOP_OPT="-k fr-ch"
653
    grep -q fr_CH $XORG_CONF && RDESKTOP_OPT="-k fr-ch"
Line 683... Line 715...
683
### mount all if AUTOMOUNT set
715
### mount all if AUTOMOUNT set
684
if [ $AUTOMOUNT ]; then
716
if [ $AUTOMOUNT ]; then
685
    mount -a
717
    mount -a
686
fi
718
fi
687
 
719
 
688
### unload/load sound module for snd-card-X (timing problem?)
-
 
689
rpm -q alsa-lib | grep el5 >/dev/null
-
 
690
if [ "$?" = "0" ]; then
-
 
691
    sound_modules=$( grep snd-card- /etc/modprobe.conf | awk ' $1 ~ /alias/ { print $3 }' | tr - _ )
-
 
692
    for module in $sound_modules; do
-
 
693
	lsmod | awk '{ print $1 }' | grep $module >/dev/null 2>&1
-
 
694
	if [ "$?" = "0" ]; then
-
 
695
	    rmmod $module    >/dev/null 2>&1
-
 
696
	    sleep 2
-
 
697
	    modprobe $module >/dev/null 2>&1
-
 
698
	fi
-
 
699
    done
-
 
700
fi
-
 
701
 
-
 
702
### unmute all mixers and set volumes
720
### unmute all mixers and set volumes
703
if [ -x /usr/bin/set-volume ]; then 
721
if [ -x /usr/bin/set-volume ]; then 
704
    if [ $NOSOUND ]; then
722
    if [ $NOSOUND ]; then
705
	/usr/bin/set-volume 0 > /var/log/set-volume.log 2>&1 &
723
	/usr/bin/set-volume 0 > /var/log/set-volume.log 2>&1 &
706
    else
724
    else
Line 716... Line 734...
716
if [ $GNOME ]; then
734
if [ $GNOME ]; then
717
    sed -i "/^DESKTOP=.*/d" /etc/sysconfig/desktop 2&>/dev/null
735
    sed -i "/^DESKTOP=.*/d" /etc/sysconfig/desktop 2&>/dev/null
718
    echo "DESKTOP=GNOME" >> /etc/sysconfig/desktop
736
    echo "DESKTOP=GNOME" >> /etc/sysconfig/desktop
719
fi
737
fi
720
 
738
 
-
 
739
### reload sound module (second time)
-
 
740
reload_soundmodule