Subversion Repositories livecd

Rev

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

Rev 7 Rev 9
Line 323... Line 323...
323
	    [ ! $VSYNC ] && VSYNC="50.0-90.0"
323
	    [ ! $VSYNC ] && VSYNC="50.0-90.0"
324
	    [ ! $SCREEN ] && SCREEN="1280x1024"
324
	    [ ! $SCREEN ] && SCREEN="1280x1024"
325
    
325
    
326
	    system-config-display \
326
	    system-config-display \
327
		--reconfig \
327
		--reconfig \
328
                -v \
-
 
329
		--set-resolution=$SCREEN \
328
		--set-resolution=$SCREEN \
330
		--set-hsync=$HSYNC \
329
		--set-hsync=$HSYNC \
331
		--set-vsync=$VSYNC \
330
		--set-vsync=$VSYNC \
332
		$video_driver | grep Trying
331
		$video_driver
333
	else
332
	else
334
	    echo "Use simple Xserver configuration."
333
	    echo "Use simple Xserver configuration."
335
	    system-config-display --noui --reconfig -v | grep Trying
334
	    system-config-display --noui --reconfig
336
	fi
335
	fi
337
    fi
336
    fi
338
fi
337
fi
339
 
338
 
340
### enable NVIDIA driver (needs nvidia, nvidia-libs rpms)
339
### enable NVIDIA driver (needs nvidia, nvidia-libs rpms)
Line 432... Line 431...
432
### update AFS users and SEPP links (only for PSI)
431
### update AFS users and SEPP links (only for PSI)
433
if [ $PSI ] && [ $AFS ]; then
432
if [ $PSI ] && [ $AFS ]; then
434
    echo "Update AFS users and SEPP links..."
433
    echo "Update AFS users and SEPP links..."
435
    [ -x /afs/psi.ch/sys/common/update_user.pl ] && /afs/psi.ch/sys/common/update_user.pl >/dev/null 2>&1 &
434
    [ -x /afs/psi.ch/sys/common/update_user.pl ] && /afs/psi.ch/sys/common/update_user.pl >/dev/null 2>&1 &
436
    [ -x /afs/psi.ch/sys/common/update_sepp.pl ] && /afs/psi.ch/sys/common/update_sepp.pl >/dev/null 2>&1 &
435
    [ -x /afs/psi.ch/sys/common/update_sepp.pl ] && /afs/psi.ch/sys/common/update_sepp.pl >/dev/null 2>&1 &
-
 
436
    sleep 1
437
    echo
437
    echo
438
fi
438
fi
439
 
439
 
440
### create local user, if "nolocal" is not set 
440
### create local user, if "nolocal" is not set 
441
if [ ! $NOLOCAL ]; then
441
if [ ! $NOLOCAL ]; then
Line 543... Line 543...
543
### define default hostname, if $HOSTNAME still not yet set
543
### define default hostname, if $HOSTNAME still not yet set
544
if [ ! $HOSTNAME ]; then
544
if [ ! $HOSTNAME ]; then
545
    HOSTNAME=$DEFAULT_HOSTNAME
545
    HOSTNAME=$DEFAULT_HOSTNAME
546
fi
546
fi
547
 
547
 
548
### set hostname
548
### set hostname for eth0 or eth1
549
export HOSTNAME=$HOSTNAME
549
export HOSTNAME=$HOSTNAME
550
hostname $HOSTNAME
550
hostname $HOSTNAME
551
sed -i "s/HOSTNAME=.*/HOSTNAME=${HOSTNAME}/" /etc/sysconfig/network
551
sed -i "s/HOSTNAME=.*/HOSTNAME=${HOSTNAME}/" /etc/sysconfig/network
552
if [ $PSI ]; then
552
if [ $PSI ]; then
553
    sed -i "s/hostname=.*/hostname=${HOSTNAME}.psi.ch/" /etc/ssmtp/ssmtp.conf
553
    sed -i "s/hostname=.*/hostname=${HOSTNAME}.psi.ch/" /etc/ssmtp/ssmtp.conf
554
    sed -i "s/HOSTNAME=.*/HOSTNAME=${HOSTNAME}/" /etc/sysconfig/cfengine
554
    sed -i "s/HOSTNAME=.*/HOSTNAME=${HOSTNAME}/" /etc/sysconfig/cfengine
555
fi
555
fi
556
for iface in eth0 eth1 eth2 eth3; do
-
 
557
    if [ -e /etc/sysconfig/network-scripts/ifcfg-${iface} ]; then
556
echo "DHCP_HOSTNAME=${HOSTNAME}" >> /etc/sysconfig/networking/devices/ifcfg-eth0
558
	echo "DHCP_HOSTNAME=${HOSTNAME}" >> /etc/sysconfig/network-scripts/ifcfg-${iface}
557
echo "DHCP_HOSTNAME=${HOSTNAME}" >> /etc/sysconfig/networking/devices/ifcfg-eth1
559
    fi
-
 
560
done
-
 
561
 
558
 
562
echo "Hostname set to: $HOSTNAME"
559
echo "Hostname set to: $HOSTNAME"
563
echo
560
echo
564
 
561
 
565
### set cups server
562
### set cups server
Line 639... Line 636...
639
### mount all if AUTOMOUNT set
636
### mount all if AUTOMOUNT set
640
if [ $AUTOMOUNT ]; then
637
if [ $AUTOMOUNT ]; then
641
    mount -a
638
    mount -a
642
fi
639
fi
643
 
640
 
644
### unload/load sound module for snd-card-X (timing problem?)
-
 
645
rpm -q alsa-lib | grep el5 >/dev/null
-
 
646
if [ "$?" = "0" ]; then
-
 
647
    sound_modules=$( grep snd-card- /etc/modprobe.conf | awk ' $1 ~ /alias/ { print $3 }' | tr - _ )
-
 
648
    for module in $sound_modules; do
-
 
649
	lsmod | awk '{ print $1 }' | grep $module >/dev/null 2>&1
-
 
650
	if [ "$?" = "0" ]; then
-
 
651
	    rmmod $module    >/dev/null 2>&1
-
 
652
	    sleep 2
-
 
653
	    modprobe $module >/dev/null 2>&1
-
 
654
	fi
-
 
655
    done
-
 
656
fi
-
 
657
 
-
 
658
### unmute all mixers and set volumes
641
### unmute all mixers and set volumes
659
if [ -x /usr/bin/set-volume ]; then 
642
if [ -x /usr/bin/set-volume ]; then 
660
    if [ $NOSOUND ]; then
643
    if [ $NOSOUND ]; then
661
	/usr/bin/set-volume 0 > /var/log/set-volume.log 2>&1 &
644
	/usr/bin/set-volume 0 > /var/log/set-volume.log 2>&1 &
662
    else
645
    else