[Frugalware-darcs] setup-current: netinstall support

VMiklos mamajom at axelero.hu
Thu Mar 16 18:04:33 CET 2006


[netinstall support
VMiklos <mamajom at axelero.hu>**20050402124434
 - fixed several typos: repro -> repo
 - added support for detecting pci and scsi cards
 - added netinstall support
 - moved devel section to the first cd
] {
addfile ./rc.hotplug
hunk ./rc.hotplug 1
+#!/bin/sh
+
+# scsi cards
+
+/sbin/modprobe isa-pnp >/dev/null 2>/dev/null
+if grep -iq SCSI /proc/pci; then
+	echo "searching scsi cards..."
+	MODDIR=`uname -r`
+	for i in `find /lib/modules/$MODDIR/kernel/drivers/scsi/ -name "*.ko" | sed 's/^.*\/// ;  s/.o$//'`;
+	do
+		echo modprobe $i
+		modprobe $i >/dev/null 2>/dev/null
+	done
+fi
+
+pci_mod_search ()
+{
+	while read IGNORE ID IGNORE
+	do
+		VENDOR=`echo $ID | cut -b1-4`
+		DEVICE=`echo $ID | cut -b5-8`
+		DEVENTRY=`echo 0x0000${VENDOR} 0x0000${DEVICE}`
+		cat /lib/modules/`uname -r`/*.pcimap | grep "$DEVENTRY" | cut -d' ' -f1
+	done
+}
+echo "searching pci cards..."
+for MODULE in `pci_mod_search < /proc/bus/pci/devices | sort -u`
+do
+	echo modprobe $MODULE
+	modprobe $MODULE >/dev/null 2>/dev/null
+done
hunk ./setup 33
-welcomebacktitle="$welcome Frugalware $osver $setup"
+welcomebacktitle="$welcome $setup"
hunk ./setup 38
+# hotplug section
+hotplugbacktitle="$hotplug - Frugalware $osver $setup"
+
hunk ./setup 135
+do_hotplug()
+{
+	dialog --backtitle "$hotplugbacktitle" --title "$hotplugt" \
+		--aspect 20 --infobox "$hotplugd" 0 0
+	/etc/rc.d/rc.hotplug >$logdev 2>$logdev
+	sleep 1
+}
+
+
hunk ./setup 165
+	if ! [ -d $bindir -o -d $exbindir ]; then #netinstall
+		netinstall=1
+		umount $sourcedir
+		netconfig
+		/etc/rc.d/rc.interfaces
+		# ugly hack
+		mkdir -p /mnt/source/frugalware /mnt/source/extra/frugalware
+		lynx -source -dump ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware/frugalware-current/Packages.lst >/mnt/source/Packages.lst
+		lynx -source -dump ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware/frugalware-current/frugalware/frugalware-current.fdb >/mnt/source/frugalware/frugalware-current.fdb
+		lynx -source -dump ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware/frugalware-current/extra/Packages.lst >/mnt/source/extra/Packages.lst
+		lynx -source -dump ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware/frugalware-current/extra/frugalware/extra-current.fdb >/mnt/source/extra/frugalware/extra-current.fdb
+	fi
hunk ./setup 464
-#	repro=$1
+#	repo=$1
hunk ./setup 466
-#	if [ "$repro" = "frugalware" ]; then
+#	if [ "$repo" = "frugalware" ]; then
hunk ./setup 469
-#	elif [ "$repro" = "extra" ]; then
+#	elif [ "$repo" = "extra" ]; then
hunk ./setup 512
-	repro=$1
-	if [ "$repro" = "frugalware" ]; then
+	repo=$1
+	if [ "$repo" = "frugalware" ]; then
hunk ./setup 516
-	elif [ "$repro" = "extra" ]; then
+	elif [ "$repo" = "extra" ]; then
hunk ./setup 529
-		if [ "$repro" = "extra" ]; then
+		if [ "$repo" = "extra" ]; then
hunk ./setup 534
-		echo -n "$i \"(`categorysize $repro $i`)\" $state ">>$selecttempfile
+		echo -n "$i \"(`categorysize $repo $i`)\" $state ">>$selecttempfile
hunk ./setup 560
-	repro=$1
+	repo=$1
hunk ./setup 562
-	if [ "$repro" = "frugalware" ]; then
+	if [ "$repo" = "frugalware" ]; then
hunk ./setup 566
-	elif [ "$repro" = "extra" ]; then
+	elif [ "$repo" = "extra" ]; then
hunk ./setup 589
-	if [ "$repro" = "extra" ]; then
+	if [ "$repo" = "extra" ]; then
hunk ./setup 595
-		if [ "$repro" = "extra" ]; then
+		if [ "$repo" = "extra" ]; then
hunk ./setup 626
-	if [ "$repro" = "frugalware" ]; then
-		for i in base apps lib multimedia network
+	if [ "$repo" = "frugalware" ]; then
+		for i in base apps lib multimedia network devel
hunk ./setup 631
-				install_packages $repro `echo $i|sed 's|.*/\(.*\)$|\1|'` $selpkg
+				install_packages $repo `echo $i|sed 's|.*/\(.*\)$|\1|'` $selpkg
hunk ./setup 637
-			for i in x11 xlib xapps xfce4 gnome kde devel
+			for i in x11 xlib xapps xfce4 gnome kde
hunk ./setup 641
-					install_packages $repro `echo $i|sed 's|.*/\(.*\)$|\1|'` $selpkg
+					install_packages $repo `echo $i|sed 's|.*/\(.*\)$|\1|'` $selpkg
hunk ./setup 645
-	elif [ "$repro" = "extra" ]; then
+	elif [ "$repo" = "extra" ]; then
hunk ./setup 651
-					install_packages $repro `echo $i|sed 's|.*/\(.*\)$|\1|'` $selpkg
+					install_packages $repo `echo $i|sed 's|.*/\(.*\)$|\1|'` $selpkg
hunk ./setup 655
-		[ -h var/cache/pacman/pkg ] && rm var/cache/pacman/pkg
hunk ./setup 661
-	repro=$1
-	if [ "$repro" = "frugalware" ]; then
-		reproname="frugalware-current"
+	repo=$1
+	if [ "$repo" = "frugalware" ]; then
+		reponame="frugalware-current"
hunk ./setup 666
-	elif [ "$repro" = "extra" ]; then
-		reproname="extra-current"
+	elif [ "$repo" = "extra" ]; then
+		reponame="extra-current"
hunk ./setup 677
-	if ! [ -d var/lib/pacman/$reproname ]; then
+	if ! [ -d var/lib/pacman/$reponame ]; then
hunk ./setup 679
-		( mkdir -p var/lib/pacman/$reproname
-		  cd var/lib/pacman/$reproname
-		  tar xzf $pacbindir/$reproname.fdb )
-		echo "[$reproname]" >>/etc/pacman.conf
-		echo "Server = file://$pacbindir" >>/etc/pacman.conf
+		if [ "$netinstall" != 1 ]; then
+			( mkdir -p var/lib/pacman/$reponame
+			  cd var/lib/pacman/$reponame
+			  tar xzf $pacbindir/$reponame.fdb )
+		else
+			pacman -Sy -r ./
+		fi
+		if [ "$netinstall" != 1 ]; then
+			if [ "$reponame" = "frugalware" -o "$reponame" = "frugalware-current" ]; then
+				echo "[$reponame]" >/etc/pacman.conf
+			else
+				echo "[$reponame]" >>/etc/pacman.conf
+			fi
+			echo "Server = file://$pacbindir" >>/etc/pacman.conf
+		fi
hunk ./setup 697
-		  ln -sf $pacbindir pkg )
+		  [ "$netinstall" != 1 ] && ln -sf $pacbindir pkg )
hunk ./setup 724
-	if ! [ -d /mnt/source/extra/frugalware/ ]; then
+	if ! [ -d /mnt/source/extra/frugalware/ -o "$netinstall" = 1 ]; then
hunk ./setup 735
-			[ -h $target/var/cache/pacman/pkg ] && \
-				rm $target/var/cache/pacman/pkg
hunk ./setup 788
+			[ -h $target/var/cache/pacman/pkg ] && \
+				rm $target/var/cache/pacman/pkg
hunk ./setup 809
+
+# hotplug section
+do_hotplug # now pci & scsi modules are loaded
hunk ./setup.en 14
+skd="Slovak / Slovensky"
hunk ./setup.en 26
+
+# hotplug section
+hotplug="Detecting hardware"
+hotplugt="Please wait"
+hotplugd="Scanning for SCSI and PCI cards"
hunk ./setup.hu 12
+# hotplug section
+hotplug="Hardver keresése"
+hotplugt="Kérem várjon"
+hotplugd="SCSI és PCI kártyák keresése"
+
}


More information about the Frugalware-darcs mailing list