public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Rick Farina" <zerochaos@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/livecd-tools:master commit in: /
Date: Thu, 26 Sep 2019 17:07:20 +0000 (UTC)	[thread overview]
Message-ID: <1569516075.0fbd94ce83aed8b8c8d13d1662b84ae75e9de0d1.zerochaos@gentoo> (raw)

commit:     0fbd94ce83aed8b8c8d13d1662b84ae75e9de0d1
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 26 16:41:15 2019 +0000
Commit:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Sep 26 16:41:15 2019 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=0fbd94ce

reap dead code from livecd-functions

 livecd-functions.sh | 211 ----------------------------------------------------
 1 file changed, 211 deletions(-)

diff --git a/livecd-functions.sh b/livecd-functions.sh
index 1204835..ad8ee1b 100644
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -18,223 +18,12 @@ livecd_parse_opt() {
 	esac
 }
 
-livecd_check_root() {
-	if [ "$(whoami)" != "root" ]
-	then
-		echo "ERROR: must be root to continue"
-		return 1
-	fi
-}
-
 livecd_get_cmdline() {
 	echo "0" > /proc/sys/kernel/printk
 	CMDLINE=$(cat /proc/cmdline)
 	export CMDLINE
 }
 
-no_gl() {
-#	einfo "If you have a card that you know is supported by either the ATI or"
-#	einfo "NVIDIA binary drivers, please file a bug with the output of lspci"
-#	einfo "on http://bugs.gentoo.org so we can resolve this."
-	GLTYPE=xorg-x11
-}
-
-ati_gl() {
-	einfo "ATI card detected."
-	if [ -e /usr/lib/xorg/modules/drivers/fglrx_drv.so ] \
-	|| [ -e /usr/lib/modules/drivers/fglrx_drv.so ]
-	then
-#		sed -i \
-#			-e 's/ati/fglrx/' \
-#			-e 's/radeon/fglrx/' \
-#			-e 's/r300/fglrx/' \
-#			/etc/X11/xorg.conf
-		GLTYPE=ati
-	else
-		GLTYPE=xorg-x11
-	fi
-}
-
-nv_gl() {
-	einfo "NVIDIA card detected."
-	if [ -e /usr/lib/xorg/modules/drivers/nvidia_drv.so ] \
-	|| [ -e /usr/lib/modules/drivers/nvidia_drv.so ]
-	then
-		GLTYPE=nvidia
-	else
-		GLTYPE=xorg-x11
-	fi
-}
-
-nv_no_gl() {
-	einfo "NVIDIA card detected."
-	echo
-	if [ -e /usr/lib/xorg/modules/drivers/nvidia_drv.so ] \
-	|| [ -e /usr/lib/modules/drivers/nvidia_drv.so ]
-	then
-		einfo "This card is not supported by the latest version of the NVIDIA"
-		einfo "binary drivers.  Switching to the X server's driver instead."
-	fi
-	GLTYPE=xorg-x11
-	sed -i 's/nvidia/nv/' /etc/X11/xorg.conf
-}
-
-get_video_cards() {
-	VIDEO_CARDS=$(lspci | grep ' VGA ')
-	NUM_CARDS=$(echo ${VIDEO_CARDS} | wc -l)
-	if [ ${NUM_CARDS} -eq 1 ]
-	then
-		NVIDIA=$(echo ${VIDEO_CARDS} | grep "nVidia Corporation")
-		ATI=$(echo ${VIDEO_CARDS} | grep "ATI Technologies")
-		if [ -n "${NVIDIA}" ]
-		then
-			NVIDIA_CARD=$(echo ${NVIDIA} | awk 'BEGIN {RS=" "} /(NV|nv|G|C)[0-9]+/ {print $1}' | cut -d. -f1 | sed 's/ //' | sed 's:[^0-9]::g')
-			# NVIDIA Model reference:
-			# http://en.wikipedia.org/wiki/Comparison_of_NVIDIA_Graphics_Processing_Units
-			if [ -n "${NVIDIA_CARD}" ]
-			then
-				if [ $(echo ${NVIDIA_CARD} | cut -dV -f2) -ge 17 ]
-				then
-					nv_gl
-				elif [ $(echo ${NVIDIA_CARD} | cut -dG -f2) -ge 70 ]
-				then
-					nv_gl
-				elif [ $(echo ${NVIDIA_CARD} | cut -dV -f2) -eq 11 ]
-				then
-					nv_gl
-				elif [ $(echo ${NVIDIA_CARD} | cut -dC -f2) -ge 50 ]
-				then
-					nv_gl
-				else
-					nv_no_gl
-				fi
-			else
-				no_gl
-			fi
-		elif [ -n "${ATI}" ]
-		then
-			ATI_CARD=$(echo ${ATI} | awk 'BEGIN {RS=" "} /(R|RV|RS)[0-9]+/ {print $1}' | sed -e 's/[^0-9]//g')
-			if [ $(echo ${ATI_CARD} | grep S) ]
-			then
-				ATI_CARD_S=$(echo ${ATI_CARD} | cut -dS -f2)
-			elif [ $(echo ${ATI_CARD} | grep V) ]
-			then
-				ATI_CARD_V=$(echo ${ATI_CARD} | cut -dV -f2)
-			else
-				ATI_CARD=$(echo ${ATI_CARD} | cut -dR -f2)
-			fi
-			if [ -n "${ATI_CARD_S}" ] && [ ${ATI_CARD_S} -ge 350 ]
-			then
-				ati_gl
-			elif [ -n "${ATI_CARD_V}" ] && [ ${ATI_CARD_V} -ge 250 ]
-			then
-				ati_gl
-			elif [ -n "${ATI_CARD}" ] && [ ${ATI_CARD} -ge 200 ]
-			then
-				ati_gl
-			else
-				no_gl
-			fi
-		else
-			no_gl
-		fi
-	fi
-}
-
-get_ifmac() {
-	local iface=$1
-
-	# Example: 00:01:6f:e1:7a:06
-	cat /sys/class/net/${iface}/address
-}
-
-
-get_ifdriver() {
-	local iface=$1
-
-	# Example: ../../../bus/pci/drivers/forcedeth (wanted: forcedeth)
-	local if_driver=$(readlink /sys/class/net/${iface}/device/driver)
-	basename ${if_driver}
-}
-
-get_ifbus() {
-	local iface=$1
-
-	# Example: ../../../bus/pci (wanted: pci)
-	# Example: ../../../../bus/pci (wanted: pci)
-	# Example: ../../../../../../bus/usb (wanted: usb)
-	local if_bus=$(readlink /sys/class/net/${iface}/device/bus)
-	basename ${if_bus}
-}
-
-get_ifproduct() {
-	local iface=$1
-	local bus=$(get_ifbus ${iface})
-	local if_pciaddr
-	local if_devname
-	local if_usbpath
-	local if_usbmanufacturer
-	local if_usbproduct
-
-	if [[ ${bus} == "pci" ]]
-	then
-		# Example: ../../../devices/pci0000:00/0000:00:0a.0 (wanted: 0000:00:0a.0)
-		# Example: ../../../devices/pci0000:00/0000:00:09.0/0000:01:07.0 (wanted: 0000:01:07.0)
-		if_pciaddr=$(readlink /sys/class/net/${iface}/device)
-		if_pciaddr=$(basename ${if_pciaddr})
-
-		# Example: 00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)
-		#  (wanted: nVidia Corporation CK804 Ethernet Controller)
-		if_devname=$(lspci -s ${if_pciaddr})
-		if_devname=${if_devname#*: }
-		if_devname=${if_devname%(rev *)}
-	fi
-
-	if [[ ${bus} == "usb" ]]
-	then
-		if_usbpath=$(readlink /sys/class/net/${iface}/device)
-		if_usbpath=/sys/class/net/${iface}/$(dirname ${if_usbpath})
-		if_usbmanufacturer=$(< ${if_usbpath}/manufacturer)
-		if_usbproduct=$(< ${if_usbpath}/product)
-
-		[[ -n ${if_usbmanufacturer} ]] && if_devname="${if_usbmanufacturer} "
-		[[ -n ${if_usbproduct} ]] && if_devname="${if_devname}${if_usbproduct}"
-	fi
-
-	if [[ ${bus} == "ieee1394" ]]
-	then
-		if_devname="IEEE1394 (FireWire) Network Adapter";
-	fi
-
-	echo ${if_devname}
-}
-
-get_ifdesc() {
-	local iface=$1
-	desc=$(get_ifproduct ${iface})
-	if [[ -n ${desc} ]]
-	then
-		echo $desc
-		return;
-	fi
-
-	desc=$(get_ifdriver ${iface})
-	if [[ -n ${desc} ]]
-	then
-		echo $desc
-		return;
-	fi
-
-	desc=$(get_ifmac ${iface})
-	if [[ -n ${desc} ]]
-	then
-		echo $desc
-		return;
-	fi
-
-	echo "Unknown"
-}
-
 livecd_console_settings() {
 	# scan for a valid baud rate
 	case "$1" in


             reply	other threads:[~2019-09-26 17:07 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 17:07 Rick Farina [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-03-07 15:35 [gentoo-commits] proj/livecd-tools:master commit in: / Brian Evans
2017-02-25  0:54 Robin H. Johnson
2017-01-10 21:54 Brian Evans
2015-10-18  2:26 William Hubbs
2015-10-18  1:45 Jorge Manuel B. S. Vicetto
2015-02-22 22:35 William Hubbs
2015-01-14 18:33 William Hubbs
2015-01-14  2:55 Jorge Manuel B. S. Vicetto
2013-07-07 22:48 William Hubbs
2013-07-07 22:28 William Hubbs
2013-07-06 23:53 William Hubbs
2013-02-25 18:20 William Hubbs
2013-02-25 17:48 William Hubbs
2013-02-25 17:48 William Hubbs
2011-06-30 20:31 William Hubbs
2011-06-28 19:56 William Hubbs
2011-06-28 17:32 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-02-17  5:38 William Hubbs
2011-02-10 21:30 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569516075.0fbd94ce83aed8b8c8d13d1662b84ae75e9de0d1.zerochaos@gentoo \
    --to=zerochaos@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox