livecd: livecd, livecd.sysconfig, rc.live, rc.live-installed, rema...

havner havner at pld-linux.org
Mon Jul 10 16:10:53 CEST 2006


Author: havner                       Date: Mon Jul 10 14:10:53 2006 GMT
Module: livecd                        Tag: HEAD
---- Log message:
- allow to turn off particular parts of autodetection via
  /etc/sysconfig/livecd or start parameters
- cosmetics

---- Files affected:
livecd:
   livecd (1.7 -> 1.8) , livecd.sysconfig (1.1 -> 1.2) , rc.live (1.27 -> 1.28) , rc.live-installed (1.11 -> 1.12) 
livecd/remaster:
   livecd_gen_iso (1.17 -> 1.18) , livecd_remaster_prep (1.15 -> 1.16) 

---- Diffs:

================================================================
Index: livecd/livecd
diff -u livecd/livecd:1.7 livecd/livecd:1.8
--- livecd/livecd:1.7	Mon Jul 10 14:43:49 2006
+++ livecd/livecd	Mon Jul 10 16:10:48 2006
@@ -11,6 +11,7 @@
 
 # Source function library
 . /etc/rc.d/init.d/functions
+. /etc/rc.d/init.d/functions-live
 
 if [ -f /etc/sysconfig/livecd ]; then
 	. /etc/sysconfig/livecd
@@ -20,31 +21,35 @@
 	start|restart|reload|force-reload)
 	CHARS="LiveCD: "
 
-	for I in `awk '/^[ \t]*alias[ \t]+eth/ {print $2}' /etc/modprobe.conf`; do
-		modprobe $I > /dev/null 2>&1
-	done
+	if [ "$CONFIG_DHCP" = "yes" ] && ! getparam nonet; then
+		for I in `awk '/^[ \t]*alias[ \t]+eth/ {print $2}' /etc/modprobe.conf`; do
+			modprobe $I > /dev/null 2>&1
+		done
 
-	for I in $DHCP_INTERFACES; do
-		if [ "`dmesg | grep $I`" != "" -o "`grep $I /etc/modprobe.conf`" != "" ]; then
-			show "Backgrounding DHCP for $I"
-			busy
-			dhcpcd "$I" &
-			ok
-		fi
-	done
+		for I in $DHCP_INTERFACES; do
+			if [ "`dmesg | grep $I`" != "" -o "`grep $I /etc/modprobe.conf`" != "" ]; then
+				show "Backgrounding DHCP for $I"
+				busy
+				dhcpcd "$I" &
+				ok
+			fi
+		done
+	fi
 
-	show "Loading mixer settings for detected audio devices"
-	busy
-	COUNT=0
-	for I in `awk '/snd-card-[0-9]/ {print $3}' /etc/modprobe.conf`; do
-		if [ ${COUNT} -eq 0 ]; then
-			aumix -d /dev/mixer -L > /dev/null 2>&1
-		else
-			aumix -d /dev/mixer${COUNT} -L > /dev/null 2>&1
-		fi
-		let $((++COUNT))
-	done
-	ok
+	if [ "$CONFIG_MIXER" = "yes" ] && ! getparam nosound; then
+		show "Loading mixer settings for detected audio devices"
+		busy
+		COUNT=0
+		for I in `awk '/snd-card-[0-9]/ {print $3}' /etc/modprobe.conf`; do
+			if [ ${COUNT} -eq 0 ]; then
+				aumix -d /dev/mixer -L > /dev/null 2>&1
+			else
+				aumix -d /dev/mixer${COUNT} -L > /dev/null 2>&1
+			fi
+			let $((++COUNT))
+		done
+		ok
+	fi
 
 	touch /var/lock/subsys/livecd
 	;;

================================================================
Index: livecd/livecd.sysconfig
diff -u livecd/livecd.sysconfig:1.1 livecd/livecd.sysconfig:1.2
--- livecd/livecd.sysconfig:1.1	Sat May 15 22:25:10 2004
+++ livecd/livecd.sysconfig	Mon Jul 10 16:10:48 2006
@@ -1,2 +1,12 @@
 # interfaces, that are searched and dhcped if found
-DHCP_INTERFACES="eth0 eth1 eth2 eth3 usb0 usb1"
+DHCP_INTERFACES="eth0 eth1 eth2 eth3 usb0 usb1 ath0 ath1"
+
+CONFIG_NET=yes
+CONFIG_SOUND=yes
+CONFIG_USB=yes
+CONFIG_PCMCIA=yes
+CONFIG_XORG=yes
+CONFIG_PARTITIONS=yes
+
+CONFIG_DHCP=yes
+CONFIG_MIXER=yes

================================================================
Index: livecd/rc.live
diff -u livecd/rc.live:1.27 livecd/rc.live:1.28
--- livecd/rc.live:1.27	Mon Jul 10 13:24:38 2006
+++ livecd/rc.live	Mon Jul 10 16:10:48 2006
@@ -12,14 +12,28 @@
 
 . /etc/sysconfig/system			# for $CONSOLE_LOGLEVEL
 
+if [ -f /etc/sysconfig/livecd ]; then
+	. /etc/sysconfig/livecd
+fi
+
 touch /fastboot
 
+# check if we are running udev
+if [ -e /dev/.udev ]; then
+	UDEV=yes
+fi
+
+if [ ! "$UDEV" = "yes" -a -x /etc/rc.d/init.d/hotplug ]; then
+	/etc/rc.d/init.d/hotplug start
+fi
+
 #if getparam debug > /dev/null; then
 #	LOG=/dev/console
 #	dmesg -n 7
 #fi
 
 LNORMAL="`termput op`"
+LREDB="`termput setaf 1 1`"
 LGREENB="`termput setaf 2 1`"
 LBLUEB="`termput setaf 4 1`"
 CHARS="LiveCD: "
@@ -137,11 +151,6 @@
 sed -i -e "s/.*ZONE_INFO_AREA=.*/ZONE_INFO_AREA=$ZONE_INFO_AREA/g" /etc/sysconfig/timezone
 sed -i -e "s/.*TIME_ZONE=.*/TIME_ZONE=$TIME_ZONE/g" /etc/sysconfig/timezone
 
-sed -i -e "s/XCHARSET/${XCHARSET}/g" /root/.Xresources
-sed -i -e "s/XCHARSET/${XCHARSET}/g" /root/.gtkrc.mine
-sed -i -e "s/XCHARSET/${XCHARSET}/g" /home/users/user/.Xresources
-sed -i -e "s/XCHARSET/${XCHARSET}/g" /home/users/user/.gtkrc.mine
-
 if [ -f /etc/motd.${LANG} ]; then
 	cp -f /etc/motd.${LANG} /etc/motd
 else
@@ -152,385 +161,386 @@
 
 show "Autodetecting PCI hardware"
 busy
-COUNT=0
-for I in `/usr/sbin/livecd-detect /usr/share/pci-database/net.pci`; do
-	echo ""
-	echo -n "Eth${COUNT}:    ${I}"
-	echo "alias eth${COUNT} ${I}" >> /etc/modprobe.conf
-	let $((++COUNT))
-done
-echo "" >> /etc/modprobe.conf
-COUNT=0
-for I in `/usr/sbin/livecd-detect -l /usr/share/pci-database/snd.pci`; do
-	echo ""
-	echo -n "Sound${COUNT}:  ${I}"
-	echo "alias snd-card-${COUNT} ${I}" >> /etc/modprobe.conf
-	echo "options ${I} enable=1" >> /etc/modprobe.conf
-	let $((++COUNT))
-done	
-COUNT=0
-for I in `/usr/sbin/livecd-detect /usr/share/pci-database/usb.pci | uniq`; do
-	echo ""
-	echo -n "Usb${COUNT}:    ${I}"
-	let $((++COUNT))
-done
-modprobe uhci-hcd >/dev/null 2>&1
-modprobe ohci-hcd >/dev/null 2>&1
-modprobe ehci-hcd >/dev/null 2>&1
-
-COUNT=0
-PCMCIA=0
-for I in `/usr/sbin/livecd-detect /usr/share/pci-database/pcmcia.pci | uniq`; do
-	if modprobe ${I} >/dev/null 2>&1; then
+if [ "$CONFIG_NET" = "yes" ] && ! getparam nonet; then
+	COUNT=0
+	for I in `/usr/sbin/livecd-detect /usr/share/pci-database/net.pci`; do
 		echo ""
-		echo -n "Pcmcia${COUNT}: ${I}"
+		echo -n "Eth${COUNT}:    ${I}"
+		echo "alias eth${COUNT} ${I}" >> /etc/modprobe.conf
 		let $((++COUNT))
-		echo "${I}" >> /etc/modules
-		PCMCIA=1
-	fi
-done
-if modprobe i82365 >/dev/null 2>&1; then
-	echo ""
-	echo -n "Pcmcia${COUNT}: i82365"
-	let $((++COUNT))
-	echo "i82365" >> /etc/modules
-	PCMCIA=1
+	done
+	echo "" >> /etc/modprobe.conf
 fi
-if modprobe tcic >/dev/null 2>&1; then
-	echo ""
-	echo -n "Pcmcia${COUNT}: tcic"
-	let $((++COUNT))
-	echo "tcic" >> /etc/modules
-	PCMCIA=1
+
+if [ "$CONFIG_SOUND" = "yes" ] && ! getparam nosound; then
+	COUNT=0
+	SOUND=0
+	for I in `/usr/sbin/livecd-detect -l /usr/share/pci-database/snd.pci`; do
+		echo ""
+		echo -n "Sound${COUNT}:  ${I}"
+		echo "alias snd-card-${COUNT} ${I}" >> /etc/modprobe.conf
+		echo "options ${I} enable=1" >> /etc/modprobe.conf
+		let $((++COUNT))
+		SOUND=1
+	done	
+	echo "" >> /etc/modprobe.conf
+	if [ "$SOUND" = "1" ]; then
+		chkconfig --level 35 alsasound on
+	else
+		chkconfig --level 35 alsasound off
+	fi
+else
+	chkconfig --level 35 alsasound off > /dev/null 2>/dev/null
 fi
-#if [ "$PCMCIA" = "1" ]; then
-#	echo "PCMCIA=yes" >> /etc/sysconfig/pcmcia
-#fi
-ok
 
-show "Detecting monitor, graphic card and loading AGP modules"
-busy
+if [ "$CONFIG_USB" = "yes" ] && ! getparam nousb; then
+	COUNT=0
+	for I in `/usr/sbin/livecd-detect /usr/share/pci-database/usb.pci | sort | uniq`; do
+		echo ""
+		echo -n "Usb${COUNT}:    ${I}"
+		let $((++COUNT))
+	done
 
-# graphic card
-MODULE=`/usr/sbin/livecd-detect /usr/share/pci-database/gfx.pci | head -1`
-if [ "${MODULE}" = "" ]; then
-	MODULE=vesa
-fi
-
-echo ""
-echo "Graphic card:  ${MODULE}"
-UMODULE="`getparam driver`"
-if [ ! "${UMODULE}" = "" ]; then
-	MODULE=${UMODULE}
-	echo "User selected driver: ${MODULE}"
-fi
-
-AGP=0
-for I in `/usr/sbin/livecd-detect /usr/share/pci-database/agp.pci | uniq`; do
-	AGP=1
-	modprobe $I >/dev/null 2>&1
-done
-if [ "$AGP" = 0 ]; then
-	modprobe sworks-agp >/dev/null 2>&1
-	modprobe sis-agp >/dev/null 2>&1
-	modprobe ali-agp >/dev/null 2>&1
-	modprobe efficeon-agp >/dev/null 2>&1
-	modprobe ati-agp >/dev/null 2>&1
-fi
-
-# fix OpenGL
-if [ "$MODULE" = "nvidia" ]; then
-	ln -f -s ../../usr/X11R6/lib/libGL-nvidia.so.1.0 /etc/live-alt/libGL.so
-	ln -f -s ../../usr/X11R6/lib/modules/extensions/libglx-nvidia.so.1.0 /etc/live-alt/libglx.so
-	sed -i -e "s/Load.*\"GLcore\"/# GLcore\ disabled/g" /etc/X11/xorg.conf
-	sed -i -e "s/Load.*\"dri\"/# dri\ disabled/g" /etc/X11/xorg.conf
-	modprobe -s nvidia >/dev/null 2>&1
-elif [ "$MODULE" = "fglrx" ]; then
-	ln -f -s ../../usr/X11R6/lib/libGL-fglrx.so.1.2 /etc/live-alt/libGL.so
-	ln -f -s ../../usr/X11R6/lib/modules/extensions/libglx-xfree.so /etc/live-alt/libglx.so
-	modprobe -s fglrx >/dev/null 2>&1
-else
-	ln -f -s ../../usr/X11R6/lib/libGL-xfree.so.1.2 /etc/live-alt/libGL.so
-	ln -f -s ../../usr/X11R6/lib/modules/extensions/libglx-xfree.so /etc/live-alt/libglx.so
-	modprobe gamma >/dev/null 2>&1
-	modprobe i810 >/dev/null 2>&1
-	modprobe i830 >/dev/null 2>&1
-	modprobe mga >/dev/null 2>&1
-	modprobe r128 >/dev/null 2>&1
-	modprobe radeon >/dev/null 2>&1
-	modprobe sis >/dev/null 2>&1
-	modprobe tdfx >/dev/null 2>&1
-fi
-
-# monitor - refresh rates
-DSIZE=1
-if [ "${MODULE}" = "vesa" ] || [ "${MODULE}" = "fbdev" ]; then
-	DSIZE=0
-fi
-HSYNC=`livecd-ddcxinfo -hsync`
-VSYNC=`livecd-ddcxinfo -vsync`
-if [ "${HSYNC}" = "0-0" ] || [ "${HSYNC}" = "" ]; then
-	echo "Monitor has no DDC support, using default values"
-	HSYNC="30.0-48.0"
-	VSYNC="50.0-75.0"
-	DSIZE=0
-fi
-
-echo "Monitor hsync: ${HSYNC}"
-echo "Monitor vsync: ${VSYNC}"
-UHSYNC="`getparam hsync`"
-UVSYNC="`getparam vsync`"
-if [ ! "${UHSYNC}" = "" ]; then
-	echo "Setting upper hsync limit to ${UHSYNC}kHz"
-	HSYNC="`echo ${HSYNC} | sed -e "s/-.*/-${UHSYNC}/g"`"
-fi
-if [ ! "${UVSYNC}" = "" ]; then
-	echo "Setting upper vsync limit to ${UVSYNC}Hz"
-	VSYNC="`echo ${VSYNC} | sed -e "s/-.*/-${UVSYNC}/g"`"
-fi
-
-# monitor - resolutions
-R1="\"640x480\""
-R2="\"800x600\""
-R3="\"1024x768\""
-R4="\"1152x864\""
-R5="\"1280x800\""
-R6="\"1280x1024\""
-R7="\"1400x1050\""
-R8="\"1440x1028\""
-R9="\"1600x1200\""
-
-RES="$R3 $R2 $R1"
-CMDRES="`getparam res`"
-case "${CMDRES}" in
-	640*)
-	RES="$R1" ;;
-	800*)
-	RES="$R2 $R1" ;;
-	1024*)
-	RES="$R3 $R2 $R1" ;;
-	1152*)
-	RES="$R4 $R3 $R2 $R1" ;;
-	1280p*)
-	RES="$R5 $R4 $R3 $R2 $R1" ;;
-	1280*)
-	RES="$R6 $R5 $R4 $R3 $R2 $R1" ;;
-	1400*)
-	RES="$R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
-	1440*)
-	RES="$R8 $R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
-	1600*)
-	RES="$R9 $R8 $R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
-esac
+	if [ ! "$UDEV" = "yes" ]; then
+		echo ohci-hcd >> /etc/modules
+		echo uhci-hcd >> /etc/modules
+		echo ehci-hcd >> /etc/modules
+	fi
+fi
 
-# color depth
-if [ "${MODULE}" = "fbdev" ]; then
-	DEPTH=16
+if [ "$CONFIG_PCMCIA" = "yes" ] && ! getparam nopcmcia; then
+	COUNT=0
+	PCMCIA=0
+	for I in `/usr/sbin/livecd-detect /usr/share/pci-database/pcmcia.pci | sort | uniq`; do
+		if modprobe ${I} >/dev/null 2>&1; then
+			echo ""
+			echo -n "Pcmcia${COUNT}: ${I}"
+			let $((++COUNT))
+			echo "${I}" >> /etc/modules
+			PCMCIA=1
+		fi
+	done
+	if modprobe i82365 >/dev/null 2>&1; then
+		echo ""
+		echo -n "Pcmcia${COUNT}: i82365"
+		let $((++COUNT))
+		echo "i82365" >> /etc/modules
+		PCMCIA=1
+	fi
+	if modprobe tcic >/dev/null 2>&1; then
+		echo ""
+		echo -n "Pcmcia${COUNT}: tcic"
+		let $((++COUNT))
+		echo "tcic" >> /etc/modules
+		PCMCIA=1
+	fi
+	# without udev we need pcmcia-cs, with udev we need pcmciautils
+	if [ ! "$UDEV" = "yes" -a "$PCMCIA" = "1" ]
+		chkconfig --level 35 pcmcia on
+	else
+		chkconfig --level 35 pcmcia off
+	fi
 else
-	DEPTH=24
+	chkconfig --level 35 pcmcia off > /dev/null 2>&1
 fi
-CMDDEPTH="'getparam depth'"
-case "${CMDDEPTH}" in
-	8)
-	DEPTH=8 ;;
-	16)
-	DEPTH=16 ;;
-	24)
-	DEPTH=24 ;;
-	32)
-	DEPTH=32 ;;
-esac
-echo -n "Using mode: ${RES} (${DEPTH}bpp)"
-
-# making xorg.conf
-cd /etc/X11/
-. /etc/sysconfig/console
-sed -i -e "s/HSYNC/${HSYNC}/;s/VSYNC/${VSYNC}/;s/DRIVER/${MODULE}/;s/RESOLUTION/${RES}/;s/DEPTH/${DEPTH}/;s/XKEYBOARD/${XKEYBOARD}/" xorg.conf
-if [ ${DSIZE} = 0 ]; then
-	sed -i -e "s/#DisplaySize/DisplaySize/g" xorg.conf
-fi
-
-CMDWM="'getparam wm'"
-case "${CMDWM}" in
-	kde)
-	echo kde > /root/.desktop
-	echo kde > /home/users/user/.desktop
-	echo Session=kde >> /root/.dmrc
-	echo Session=kde >> /home/users/user/.dmrc
-	;;
-	gnome)
-	echo gnome > /root/.desktop
-	echo gnome > /home/users/user/.desktop
-	echo Session=gnome >> /root/.dmrc
-	echo Session=gnome >> /home/users/user/.dmrc
-	;;
-	xfce4)
-	echo xfce4 > /root/.desktop
-	echo xfce4 > /home/users/user/.desktop
-	echo Session=xfce4 >> /root/.dmrc
-	echo Session=xfce4 >> /home/users/user/.dmrc
-	;;
-	fluxbox)
-	echo fluxbox > /root/.desktop
-	echo fluxbox > /home/users/user/.desktop
-	echo Session=fluxbox >> /root/.dmrc
-	echo Session=fluxbox >> /home/users/user/.dmrc
-	;;
-	wmaker)
-	echo WindowMaker > /root/.desktop
-	echo WindowMaker > /home/users/user/.desktop
-	echo Session=WindowMaker >> /root/.dmrc
-	echo Session=WindowMaker >> /home/users/user/.dmrc
-	;;
-	icewm)
-	echo icewm > /root/.desktop
-	echo icewm > /home/users/user/.desktop
-	echo Session=icewm >> /root/.dmrc
-	echo Session=icewm >> /home/users/user/.dmrc
-	;;
-esac
 
 ok
 
+
+if [ "$CONFIG_XORG" = "yes" -a -f /etc/X11/xorg.conf ] && ! getparam noxorg; then
+	show "Detecting monitor, graphic card and loading AGP modules"
+	busy
+
+	# graphic card
+	MODULE=`/usr/sbin/livecd-detect /usr/share/pci-database/gfx.pci | head -1`
+	if [ "${MODULE}" = "" ]; then
+		MODULE=vesa
+	fi
+
+	echo ""
+	echo "Graphic card:  ${MODULE}"
+	UMODULE="`getparam driver`"
+	if [ ! "${UMODULE}" = "" ]; then
+		MODULE=${UMODULE}
+		echo "User selected driver: ${MODULE}"
+	fi
+
+	AGP=0
+	for I in `/usr/sbin/livecd-detect /usr/share/pci-database/agp.pci | uniq`; do
+		AGP=1
+		modprobe $I >/dev/null 2>&1
+	done
+	if [ "$AGP" = 0 ]; then
+		modprobe sworks-agp >/dev/null 2>&1
+		modprobe sis-agp >/dev/null 2>&1
+		modprobe ali-agp >/dev/null 2>&1
+		modprobe efficeon-agp >/dev/null 2>&1
+		modprobe ati-agp >/dev/null 2>&1
+	fi
+
+	# fix OpenGL
+	if [ "$MODULE" = "nvidia" ]; then
+		ln -f -s ../../usr/X11R6/lib/libGL-nvidia.so.1.0 /etc/live-alt/libGL.so
+		ln -f -s ../../usr/X11R6/lib/modules/extensions/libglx-nvidia.so.1.0 /etc/live-alt/libglx.so
+		sed -i -e "s/Load.*\"GLcore\"/# GLcore\ disabled/g" /etc/X11/xorg.conf
+		sed -i -e "s/Load.*\"dri\"/# dri\ disabled/g" /etc/X11/xorg.conf
+		modprobe -s nvidia >/dev/null 2>&1
+	elif [ "$MODULE" = "fglrx" ]; then
+		ln -f -s ../../usr/X11R6/lib/libGL-fglrx.so.1.2 /etc/live-alt/libGL.so
+		ln -f -s ../../usr/X11R6/lib/modules/extensions/libglx-xfree.so /etc/live-alt/libglx.so
+		modprobe -s fglrx >/dev/null 2>&1
+	else
+		ln -f -s ../../usr/X11R6/lib/libGL-xfree.so.1.2 /etc/live-alt/libGL.so
+		ln -f -s ../../usr/X11R6/lib/modules/extensions/libglx-xfree.so /etc/live-alt/libglx.so
+		modprobe gamma >/dev/null 2>&1
+		modprobe i810 >/dev/null 2>&1
+		modprobe i830 >/dev/null 2>&1
+		modprobe mga >/dev/null 2>&1
+		modprobe r128 >/dev/null 2>&1
+		modprobe radeon >/dev/null 2>&1
+		modprobe sis >/dev/null 2>&1
+		modprobe tdfx >/dev/null 2>&1
+	fi
+
+	# monitor - refresh rates
+	DSIZE=1
+	if [ "${MODULE}" = "vesa" ] || [ "${MODULE}" = "fbdev" ]; then
+		DSIZE=0
+	fi
+	HSYNC=`livecd-ddcxinfo -hsync`
+	VSYNC=`livecd-ddcxinfo -vsync`
+	if [ "${HSYNC}" = "0-0" ] || [ "${HSYNC}" = "" ]; then
+		echo "Monitor has no DDC support, using default values"
+		HSYNC="30.0-48.0"
+		VSYNC="50.0-75.0"
+		DSIZE=0
+	fi
+
+	echo "Monitor hsync: ${HSYNC}"
+	echo "Monitor vsync: ${VSYNC}"
+	UHSYNC="`getparam hsync`"
+	UVSYNC="`getparam vsync`"
+	if [ ! "${UHSYNC}" = "" ]; then
+		echo "Setting upper hsync limit to ${UHSYNC}kHz"
+		HSYNC="`echo ${HSYNC} | sed -e "s/-.*/-${UHSYNC}/g"`"
+	fi
+	if [ ! "${UVSYNC}" = "" ]; then
+		echo "Setting upper vsync limit to ${UVSYNC}Hz"
+		VSYNC="`echo ${VSYNC} | sed -e "s/-.*/-${UVSYNC}/g"`"
+	fi
+
+	# monitor - resolutions
+	R1="\"640x480\""
+	R2="\"800x600\""
+	R3="\"1024x768\""
+	R4="\"1152x864\""
+	R5="\"1280x800\""
+	R6="\"1280x960\""
+	R7="\"1280x1024\""
+	R8="\"1400x1050\""
+	R9="\"1440x1028\""
+	R10="\"1600x1200\""
+
+	RES="$R3 $R2 $R1"
+	CMDRES="`getparam res`"
+	case "${CMDRES}" in
+		640*)
+		RES="$R1" ;;
+		800*)
+		RES="$R2 $R1" ;;
+		1024*)
+		RES="$R3 $R2 $R1" ;;
+		1152*)
+		RES="$R4 $R3 $R2 $R1" ;;
+		1280p*)
+		RES="$R5 $R4 $R3 $R2 $R1" ;;
+		1280n*)
+		RES="$R6 $R5 $R4 $R3 $R2 $R1" ;;
+		1280*)
+		RES="$R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
+		1400*)
+		RES="$R8 $R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
+		1440*)
+		RES="$R9 $R8 $R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
+		1600*)
+		RES="$R10 $R9 $R8 $R7 $R6 $R5 $R4 $R3 $R2 $R1" ;;
+	esac
+
+	# color depth
+	if [ "${MODULE}" = "fbdev" ]; then
+		DEPTH=16
+	else
+		DEPTH=24
+	fi
+	CMDDEPTH="'getparam depth'"
+	case "${CMDDEPTH}" in
+		8)
+		DEPTH=8 ;;
+		16)
+		DEPTH=16 ;;
+		24)
+		DEPTH=24 ;;
+		32)
+		DEPTH=32 ;;
+	esac
+	echo -n "Using mode: ${RES} (${DEPTH}bpp)"
+
+	# making xorg.conf
+	cd /etc/X11/
+	sed -i -e "s/HSYNC/${HSYNC}/;s/VSYNC/${VSYNC}/;s/DRIVER/${MODULE}/;s/RESOLUTION/${RES}/;s/DEPTH/${DEPTH}/;s/XKEYBOARD/${XKEYBOARD}/" xorg.conf
+	if [ ${DSIZE} = 0 ]; then
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/livecd/livecd?r1=1.7&r2=1.8&f=u
    http://cvs.pld-linux.org/livecd/livecd.sysconfig?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/livecd/rc.live?r1=1.27&r2=1.28&f=u
    http://cvs.pld-linux.org/livecd/rc.live-installed?r1=1.11&r2=1.12&f=u
    http://cvs.pld-linux.org/livecd/remaster/livecd_gen_iso?r1=1.17&r2=1.18&f=u
    http://cvs.pld-linux.org/livecd/remaster/livecd_remaster_prep?r1=1.15&r2=1.16&f=u



More information about the pld-cvs-commit mailing list