public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-06-28 19:56 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-06-28 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     1058b90acbaa2550892cfe93c2cef8dad0e1cacd
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 19:54:44 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 19:54:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=1058b90a

remove bashlogin

This can be removed since our inittab no longer uses it.

---
 bashlogin |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/bashlogin b/bashlogin
deleted file mode 100755
index ea9493a..0000000
--- a/bashlogin
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-export HOME=/root
-cat /etc/motd 2>/dev/null
-cd /root
-[[ -e .bash_profile ]] && source .bash_profile
-exec -l /bin/bash -i



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2019-09-26 17:07 Rick Farina
  0 siblings, 0 replies; 45+ messages in thread
From: Rick Farina @ 2019-09-26 17:07 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2017-03-07 15:35 Brian Evans
  0 siblings, 0 replies; 45+ messages in thread
From: Brian Evans @ 2017-03-07 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     1297ec97d29b680778c2c985a6a9e2d693af764b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  7 15:28:37 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Mar  7 15:34:04 2017 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=1297ec97

net-setup: Fix zero argument mode

The grepped output of 'ifconfig -a' included a colon after each interface.
This broke subsequent calls for information on the interface.

Also, instead of flashing an error when a path did not exist,
check that it does exist before calling basename.

Skip sit0 as it cannot be configured.

Finally, check the return value of the dialog call.
Only zero means an interface was selected to be processed.

 net-setup | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/net-setup b/net-setup
index d47628b..f106f46 100755
--- a/net-setup
+++ b/net-setup
@@ -7,7 +7,7 @@ get_ifbus() {
 	# Example: ../../../../bus/pci (wanted: pci)
 	# Example: ../../../../../../bus/usb (wanted: usb)
 	local if_bus=$(readlink /sys/class/net/${iface}/device/subsystem)
-	basename ${if_bus}
+	[[ -e "${if_bus}" ]] && basename ${if_bus}
 }
 
 get_ifproduct() {
@@ -57,7 +57,7 @@ get_ifdriver() {
 
 	# Example: ../../../bus/pci/drivers/forcedeth (wanted: forcedeth)
 	local if_driver=$(readlink /sys/class/net/${iface}/device/driver)
-	basename ${if_driver}
+	[[ -e "${if_driver}" ]] && basename ${if_driver}
 }
 
 get_ifmac() {
@@ -98,19 +98,17 @@ show_ifmenu() {
 	local opts
 	IFS="
 "
-	for ifname in $(ifconfig -a | grep "^[^ ]"); do
+	for ifname in $(ifconfig -a | grep "^[^ ]" | cut -d : -f 1); do
 		ifname="${ifname%% *}"
 		[[ ${ifname} == "lo" ]] && continue
+		[[ ${ifname} == "sit0" ]] && continue
 		opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'"
 	done
 	IFS="${old_ifs}"
 
-	if ! eval dialog --visit-items \
+	dialog --visit-items --trim \
 		--menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
-	then
-		exit
-	fi
-
+	[[ $? -gt 0 ]] && exit
 	iface=$(< iface)
 }
 


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2017-02-25  0:54 Robin H. Johnson
  0 siblings, 0 replies; 45+ messages in thread
From: Robin H. Johnson @ 2017-02-25  0:54 UTC (permalink / raw
  To: gentoo-commits

commit:     990042207e9818a2ae2886dee82c05301460d6c4
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 25 00:51:51 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Feb 25 00:51:51 2017 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=99004220

Cleanup old ChangeLog; full history in Git.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 ChangeLog | 40 ----------------------------------------
 1 file changed, 40 deletions(-)

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index ec394f4..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,40 +0,0 @@
-# ChangeLog for livecd-tools
-# Copyright 1999-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
-# Distributed under the GPL v2
-
-  27 Dec 2009; Andrew Gaffney <agaffney@gentoo.org> autoconfig:
-  Unmute Speaker control (for Gentoo bug #292437)
-
-  27 Dec 2009; Andrew Gaffney <agaffney@gentoo.org> autoconfig, -x-setup,
-  -x-setup.init:
-  Remove x-setup and mkxf86config stuff since they're not needed with modern
-  xorg-server (for Gentoo bug #289946)
-
-  27 Dec 2009; Andrew Gaffney <agaffney@gentoo.org> autoconfig:
-  Use /etc/.noxdm intead of /etc/init.d/.noxdm for Gentoo bug #286308
-
-  07 Jul 2009; Chris Gianelloni <wolf31o2@wolf31o2.org> +AUTHORS:
-  Adding an AUTHORS file. I have no idea if this thing is correct. I will
-  have to dig through the history to make sure. At any rate, it is better to
-  give some credit, even if it is not perfect.
-
-  28 Jun 2009; Andrew Gaffney <agaffney@gentoo.org> autoconfig:
-  Apply patch for speakup support from Gentoo bug #267708
-
-  28 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> autoconfig:
-  Apply patch from jer for Gentoo bug #249155
-
-  21 Aug 2008; Andrew Gaffney <agaffney@gentoo.org> bashlogin:
-  export HOME=/root for bug 235068
-
-  28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> TODO:
-  Added some more notes to TODO and add a ChangeLog entry for Andrew's
-  latest changes.
-
-  24 Jul 2008; Andrew Gaffney <agaffney@gentoo.org> autoconfig:
-  Fix passwd= support for Gentoo bug #230968.
-
-  24 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> ChangeLog:
-  Initial ChangeLog, forked from Gentoo version 1.0.40 for further
-  development.
-


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2017-01-10 21:54 Brian Evans
  0 siblings, 0 replies; 45+ messages in thread
From: Brian Evans @ 2017-01-10 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     4f58d313e461b9e9b38d3f6cae7ec5d5a0656cac
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  4 13:27:55 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Nov  4 13:59:03 2016 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=4f58d313

net-setup: add WPA{,2}-PSK setup option

 net-setup | 44 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 40 insertions(+), 4 deletions(-)

diff --git a/net-setup b/net-setup
index 78625f7..d47628b 100755
--- a/net-setup
+++ b/net-setup
@@ -188,6 +188,24 @@ config_wireless() {
 	fi
 }
 
+config_wpa() {
+	cd /tmp/setup.opts
+	dialog --visit-items --title "SSID" \
+		--inputbox "Please enter your SSID" \
+		20 50 2> ${iface}.SSID
+	SSID=$(tail -n 1 ${iface}.SSID)
+	dialog --visit-items --title "WPA(2)-PSK" \
+		--inputbox "Please enter your WPA Preshared key in ASCII form.  This should be between 8 and 63 characters" \
+		20 50 2> ${iface}.WPAKEY
+	WPA_KEY=$(tail -n 1 ${iface}.WPAKEY)
+	if [ -n "${WPA_KEY}" ]
+	then
+		mkdir -p /etc/wpa_supplicant
+		wpa_passphrase "${SSID}" "${WPA_KEY}" > /etc/wpa_supplicant/wpa_supplicant.conf
+		wpa_supplicant -B -i${iface} -c /etc/wpa_supplicant/wpa_supplicant.conf -Dnl80211,wext
+	fi
+}
+
 config_ip() {
 	cd /tmp/setup.opts
 	dialog --visit-items --title "TCP/IP setup" \
@@ -310,10 +328,22 @@ write_wireless_conf() {
 	fi
 }
 
+write_wpa_conf() {
+	cd /tmp/setup.opts
+	SSID=$(tail -n 1 ${iface}.SSID)
+	if [ -n "${SSID}" ]
+	then
+		echo "" >> /etc/conf.d/net
+		echo "# This wireless configuration file was built by net-setup" > /etc/conf.d/net
+		echo "modules_${iface}=\"wpa_supplicant\"" >> /etc/conf.d/net
+		echo "wpa_supplicant_${iface}=\"-Dnl80211,wext\"" >> /etc/conf.d/net
+	fi
+}
+
 write_net_conf() {
 	cd /tmp/setup.opts
-	echo "" > /etc/conf.d/net
-	echo "# This network configuration was written by net-setup" > /etc/conf.d/net
+	echo "" >> /etc/conf.d/net
+	echo "# This network configuration was written by net-setup" >> /etc/conf.d/net
 	DHCP=$(tail -n 1 ${iface}.DHCP)
 	case ${DHCP} in
 		1)
@@ -367,16 +397,22 @@ done
 
 dialog --visit-items --title "Network setup" \
 	--menu "This script is designed to setup both wired and wireless network settings.  All questions below apply to the ${iface} interface only.  Choose one option:" \
-	20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
+	20 60 7 1 "My network is wired" 2 "My network is wireless (Open/WEP)" \
+	3 "My network is wireless (WPA-PSK/WPA2-PSK)" 2> ${iface}.WIRED_WIRELESS
 WIRED_WIRELESS=$(tail -n 1 ${iface}.WIRED_WIRELESS)
 case ${WIRED_WIRELESS} in
 	1)
+		config_ip
+		;;
+	2)
 		config_wireless
 		config_ip
 		write_wireless_conf
 		;;
-	2)
+	3)
+		config_wpa
 		config_ip
+		write_wpa_conf
 		;;
 esac
 write_net_conf


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2015-10-18  2:26 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2015-10-18  2:26 UTC (permalink / raw
  To: gentoo-commits

commit:     bf37db71ed13ef56209931a1e56ee7daeac1032e
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sun Oct 18 02:25:29 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Oct 18 02:25:29 2015 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=bf37db71

    net-setup: read the bus name from the subsystem symbolic link

    The /sys/class/net/${device}/bus path doesn't appear to be valid, so
    moving to the new link.

 net-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-setup b/net-setup
index 088d803..78625f7 100755
--- a/net-setup
+++ b/net-setup
@@ -6,7 +6,7 @@ get_ifbus() {
 	# 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)
+	local if_bus=$(readlink /sys/class/net/${iface}/device/subsystem)
 	basename ${if_bus}
 }
 


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2015-10-18  1:45 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 45+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2015-10-18  1:45 UTC (permalink / raw
  To: gentoo-commits

commit:     df555689431ffecf4c965d43fd2f375b81679332
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 18 01:28:50 2015 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Sun Oct 18 01:28:50 2015 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=df555689

Allow users to specify the network config using ipfconfig or iproute2 syntax.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

 net-setup | 75 ++++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 53 insertions(+), 22 deletions(-)

diff --git a/net-setup b/net-setup
index 0060872..088d803 100755
--- a/net-setup
+++ b/net-setup
@@ -200,32 +200,63 @@ config_ip() {
 			/sbin/dhcpcd -n -t 10 -h $(hostname) ${iface} &
 		;;
 		2)
-			dialog --visit-items --title "IP address" \
-			--inputbox "Please enter an IP address for ${iface}:" \
-			20 50 "192.168.1.1" 2> ${iface}.IP
-			IP=$(tail -n 1 ${iface}.IP)
-			BC_TEMP=$(echo $IP|cut -d . -f 1).$(echo $IP|cut -d . -f 2).$(echo $IP|cut -d . -f 3).255
-			dialog --visit-items --title "Broadcast address" \
-				--inputbox "Please enter a Broadcast address for ${iface}:" \
-				20 50 "${BC_TEMP}" 2> ${iface}.BC
-			BROADCAST=$(tail -n 1 ${iface}.BC)
-			dialog --visit-items --title "Network mask" \
-				--inputbox "Please enter a Network Mask for ${iface}:" \
-				20 50 "255.255.255.0" 2> ${iface}.NM
-			NETMASK=$(tail -n 1 ${iface}.NM)
-			dialog --visit-items --title "Gateway" \
-				--inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" \
-				20 50 2> ${iface}.GW
-			GATEWAY=$(tail -n 1 ${iface}.GW)
+
+			dialog --visit-items --title "TCP/IP setup" \
+				--menu "Do you want to use ifconfig (192.168.0.1 255.255.255.0) or iproute2 (192.168.0.1/24) syntax?.  Choose one option:" \
+				20 60 7 1 "Use ifconfig to configure the network" \
+				2 "Use iproute2 to configure the network" 2> ${iface}.SYNTAX
+			SYNTAX=$(tail -n 1 ${iface}.SYNTAX)
+			case ${SYNTAX} in
+				1)
+
+					dialog --visit-items --title "IP address" \
+					--inputbox "Please enter an IP address for ${iface}:" \
+					20 50 "192.168.1.1" 2> ${iface}.IP
+					IP=$(tail -n 1 ${iface}.IP)
+					BC_TEMP=$(echo $IP|cut -d . -f 1).$(echo $IP|cut -d . -f 2).$(echo $IP|cut -d . -f 3).255
+					dialog --visit-items --title "Broadcast address" \
+						--inputbox "Please enter a Broadcast address for ${iface}:" \
+						20 50 "${BC_TEMP}" 2> ${iface}.BC
+					BROADCAST=$(tail -n 1 ${iface}.BC)
+					dialog --visit-items --title "Network mask" \
+						--inputbox "Please enter a Network Mask for ${iface}:" \
+						20 50 "255.255.255.0" 2> ${iface}.NM
+					NETMASK=$(tail -n 1 ${iface}.NM)
+					dialog --visit-items --title "Gateway" \
+						--inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" \
+						20 50 2> ${iface}.GW
+					GATEWAY=$(tail -n 1 ${iface}.GW)
+
+					ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
+
+					if [ -n "${GATEWAY}" ]
+					then
+						route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
+					fi
+				;;
+				2)
+
+					dialog --visit-items --title "IP address" \
+					--inputbox "Please enter an IP address for ${iface}:" \
+					20 50 "192.168.1.1/24" 2> ${iface}.IP
+					IP=$(tail -n 1 ${iface}.IP)
+					dialog --visit-items --title "Gateway" \
+						--inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" \
+						20 50 2> ${iface}.GW
+					GATEWAY=$(tail -n 1 ${iface}.GW)
+
+					ip addr add ${IP} dev ${iface}
+
+					if [ -n "${GATEWAY}" ]
+					then
+						ip route add default via ${GATEWAY}
+					fi
+			esac
+
 			dialog --visit-items --title "DNS server"\
 				--inputbox "Please enter a name server to use (hit enter for none:)" \
 				20 50 2> ${iface}.DNS
 			DNS=$(tail -n 1 ${iface}.DNS)
-			ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
-			if [ -n "${GATEWAY}" ]
-			then
-				route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
-			fi
 			if [ -n "${DNS}" ]
 			then
 				dialog --visit-items --title "DNS Search Suffix" \


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2015-02-22 22:35 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2015-02-22 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     764f654a5136aa182e2a0ef8c8e26b81a8934dcb
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sun Feb 22 22:33:10 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Feb 22 22:33:10 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=764f654a

Encorporate code from livecd-functions

These functions only seem to be used by the net-setup script, so I do
not see a reason to source livecd-functions when we can encorporate them
directly.

---
 net-setup | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 97 insertions(+), 8 deletions(-)

diff --git a/net-setup b/net-setup
index e6d2979..0060872 100755
--- a/net-setup
+++ b/net-setup
@@ -1,5 +1,98 @@
 #!/bin/bash
 
+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_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_ifmac() {
+	local iface=$1
+
+	# Example: 00:01:6f:e1:7a:06
+	cat /sys/class/net/${iface}/address
+}
+
+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"
+}
+
 show_ifmenu() {
 	local old_ifs="${IFS}"
 	local opts
@@ -212,22 +305,18 @@ write_net_conf() {
 	esac
 }
 
-if [ -f /sbin/livecd-functions.sh ]
+if [ ! -x $(which dialog) ]
 then
-	source /sbin/livecd-functions.sh
-else
-	echo "ERROR: /sbin/livecd-functions.sh could not be loaded!"
+	echo "ERROR: The dialog utility is required for net-setup.  Exiting!"
 	exit 1
 fi
 
-if [ ! -x $(which dialog) ]
+if [ "$(whoami)" != "root" ]
 then
-	echo "ERROR: The dialog utility is required for net-setup.  Exiting!"
+	echo "ERROR: must be root to continue"
 	exit 1
 fi
 
-livecd_check_root || exit 1
-
 if [ -z "${1}" ]
 then
 	show_ifmenu


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2015-01-14 18:33 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2015-01-14 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     771ced3aa9fd2792b340357981e3dfb3778791a0
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 14 18:02:01 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jan 14 18:02:01 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=771ced3a

Drop the use of bash arrays

---
 net-setup | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-setup b/net-setup
index e8a42b5..e6d2979 100755
--- a/net-setup
+++ b/net-setup
@@ -181,7 +181,7 @@ write_wireless_conf() {
 				:
 			;;
 		esac
-		echo "preferred_aps=( \"${SSID}\" )" >> /etc/conf.d/net
+		echo "preferred_aps=\"${SSID}\"" >> /etc/conf.d/net
 		echo "associate_order=\"forcepreferredonly\"" >> /etc/conf.d/net
 	fi
 }
@@ -202,10 +202,10 @@ write_net_conf() {
 			GATEWAY=$(tail -n 1 ${iface}.GW)
 			if [ -n "${IP}" -a -n "${BROADCAST}" -a -n "${NETMASK}" ]
 			then
-				echo "config_${iface}=( \"${IP} broadcast ${BROADCAST} netmask ${NETMASK}\" )" >> /etc/conf.d/net
+				echo "config_${iface}=\"${IP} broadcast ${BROADCAST} netmask ${NETMASK}\"" >> /etc/conf.d/net
 				if [ -n "${GATEWAY}" ]
 				then
-					echo "routes_${iface}=( \"default via ${GATEWAY}\" )" >> /etc/conf.d/net
+					echo "routes_${iface}=\"default via ${GATEWAY}\"" >> /etc/conf.d/net
 				fi
 			fi
 		;;


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2015-01-14  2:55 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 45+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2015-01-14  2:55 UTC (permalink / raw
  To: gentoo-commits

commit:     dd77f25df829fa248a525e540ef109dce51beb3d
Author:     EmanueL Czirai <emanueLczirai <AT> cryptoLab <DOT> net>
AuthorDate: Wed Jan 14 02:46:23 2015 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Wed Jan 14 02:46:23 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=dd77f25d

Add a missing "\" in net-setup script.

Gentoo-Bug: 536432
Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=536432
X-Patch-URL: https://536432.bugs.gentoo.org/attachment.cgi?id=393846
Signed-off-by: EmanueL Czirai <emanueLczirai <AT> cryptoLab.net>
Signed-off-by: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo.org>

---
 net-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-setup b/net-setup
index 785631b..e8a42b5 100755
--- a/net-setup
+++ b/net-setup
@@ -116,7 +116,7 @@ config_ip() {
 				--inputbox "Please enter a Broadcast address for ${iface}:" \
 				20 50 "${BC_TEMP}" 2> ${iface}.BC
 			BROADCAST=$(tail -n 1 ${iface}.BC)
-			dialog --visit-items --title "Network mask"
+			dialog --visit-items --title "Network mask" \
 				--inputbox "Please enter a Network Mask for ${iface}:" \
 				20 50 "255.255.255.0" 2> ${iface}.NM
 			NETMASK=$(tail -n 1 ${iface}.NM)


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2013-07-07 22:48 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2013-07-07 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     82c72caf8633f7a7cb94befcc869f28c71077c73
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  7 17:22:33 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jul  7 22:44:35 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=82c72caf

net-setup: make dialog calls more readable

This splits the dialog calls onto multiple lines to make them more
readable.

---
 net-setup | 59 ++++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 15 deletions(-)

diff --git a/net-setup b/net-setup
index 4216787..785631b 100755
--- a/net-setup
+++ b/net-setup
@@ -12,7 +12,8 @@ show_ifmenu() {
 	done
 	IFS="${old_ifs}"
 
-	if ! eval dialog --visit-items --menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
+	if ! eval dialog --visit-items \
+		--menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
 	then
 		exit
 	fi
@@ -34,7 +35,8 @@ show_ifconfirm() {
 	[[ -n ${if_bus} ]] && text="${text}Bus type: ${if_bus}\n"
 	text="${text}\nIs this the interface that you wish to configure?"
 
-	if ! dialog --visit-items --title "Interface details" --yesno "${text}" 15 70
+	if ! dialog --visit-items --title "Interface details" --yesno \
+		"${text}" 15 70
 	then
 		result="no"
 	else
@@ -44,19 +46,27 @@ show_ifconfirm() {
 
 config_wireless() {
 	cd /tmp/setup.opts
-	dialog --visit-items --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID
+	dialog --visit-items --title "SSID" \
+		--inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" \
+		20 50 2> ${iface}.SSID
 	SSID=$(tail -n 1 ${iface}.SSID)
 	if [ -n "${SSID}" ]
 	then
-		dialog --visit-items --title "WEP (Part 1)" --menu "Does your network use encryption?" 20 60 7 1 "Yes" 2 "No" 2> ${iface}.WEP
+		dialog --visit-items --title "WEP (Part 1)" \
+			--menu "Does your network use encryption?" \
+			20 60 7 1 "Yes" 2 "No" 2> ${iface}.WEP
 		WEP=$(tail -n 1 ${iface}.WEP)
 		case ${WEP} in
 			1)
-				dialog --visit-items --title "WEP (Part 2)" --menu "Are you entering your WEP key in HEX or ASCII?" 20 60 7 1 "HEX" 2 "ASCII" 2> ${iface}.WEPTYPE
+				dialog --visit-items --title "WEP (Part 2)" \
+					--menu "Are you entering your WEP key in HEX or ASCII?" \
+					20 60 7 1 "HEX" 2 "ASCII" 2> ${iface}.WEPTYPE
 				WEP_TYPE=$(tail -n 1 ${iface}.WEPTYPE)
 				case ${WEP_TYPE} in
 					1)
-						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in the form of XXXX-XXXX-XX for 64-bit or XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX for 128-bit" 20 50 2> ${iface}.WEPKEY
+						dialog --visit-items --title "WEP (Part 3)" \
+							--inputbox "Please enter your WEP key in the form of XXXX-XXXX-XX for 64-bit or XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX for 128-bit" \
+							20 50 2> ${iface}.WEPKEY
 						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
 						if [ -n "${WEP_KEY}" ]
 						then
@@ -65,7 +75,9 @@ config_wireless() {
 						fi
 					;;
 					2)
-						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in ASCII form.  This should be 5 or 13 characters for either 64-bit or 128-bit encryption, repectively" 20 50 2> ${iface}.WEPKEY
+						dialog --visit-items --title "WEP (Part 3)" \
+							--inputbox "Please enter your WEP key in ASCII form.  This should be 5 or 13 characters for either 64-bit or 128-bit encryption, respectively" \
+							20 50 2> ${iface}.WEPKEY
 						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
 						if [ -n "${WEP_KEY}" ]
 						then
@@ -85,23 +97,36 @@ config_wireless() {
 
 config_ip() {
 	cd /tmp/setup.opts
-	dialog --visit-items --title "TCP/IP setup" --menu "You can use DHCP to automatically configure a network interface or you can specify an IP and related settings manually. Choose one option:" 20 60 7 1 "Use DHCP to auto-detect my network settings" 2 "Specify an IP address manually" 2> ${iface}.DHCP
+	dialog --visit-items --title "TCP/IP setup" \
+		--menu "You can use DHCP to automatically configure a network interface or you can specify an IP and related settings manually.  Choose one option:" \
+		20 60 7 1 "Use DHCP to auto-detect my network settings" \
+		2 "Specify an IP address manually" 2> ${iface}.DHCP
 	DHCP=$(tail -n 1 ${iface}.DHCP)
 	case ${DHCP} in
 		1)
 			/sbin/dhcpcd -n -t 10 -h $(hostname) ${iface} &
 		;;
 		2)
-			dialog --visit-items --title "IP address" --inputbox "Please enter an IP address for ${iface}:" 20 50 "192.168.1.1" 2> ${iface}.IP
+			dialog --visit-items --title "IP address" \
+			--inputbox "Please enter an IP address for ${iface}:" \
+			20 50 "192.168.1.1" 2> ${iface}.IP
 			IP=$(tail -n 1 ${iface}.IP)
 			BC_TEMP=$(echo $IP|cut -d . -f 1).$(echo $IP|cut -d . -f 2).$(echo $IP|cut -d . -f 3).255
-			dialog --visit-items --title "Broadcast address" --inputbox "Please enter a Broadcast address for ${iface}:" 20 50 "${BC_TEMP}" 2> ${iface}.BC
+			dialog --visit-items --title "Broadcast address" \
+				--inputbox "Please enter a Broadcast address for ${iface}:" \
+				20 50 "${BC_TEMP}" 2> ${iface}.BC
 			BROADCAST=$(tail -n 1 ${iface}.BC)
-			dialog --visit-items --title "Network mask" --inputbox "Please enter a Network Mask for ${iface}:" 20 50 "255.255.255.0" 2> ${iface}.NM
+			dialog --visit-items --title "Network mask"
+				--inputbox "Please enter a Network Mask for ${iface}:" \
+				20 50 "255.255.255.0" 2> ${iface}.NM
 			NETMASK=$(tail -n 1 ${iface}.NM)
-			dialog --visit-items --title "Gateway" --inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" 20 50 2> ${iface}.GW
+			dialog --visit-items --title "Gateway" \
+				--inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" \
+				20 50 2> ${iface}.GW
 			GATEWAY=$(tail -n 1 ${iface}.GW)
-			dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS
+			dialog --visit-items --title "DNS server"\
+				--inputbox "Please enter a name server to use (hit enter for none:)" \
+				20 50 2> ${iface}.DNS
 			DNS=$(tail -n 1 ${iface}.DNS)
 			ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
 			if [ -n "${GATEWAY}" ]
@@ -110,7 +135,9 @@ config_ip() {
 			fi
 			if [ -n "${DNS}" ]
 			then
-				dialog --visit-items --title "DNS Search Suffix" --inputbox "Please enter any domains which you would like to search on DNS queries (hit enter for none:)" 20 50 2> ${iface}.SUFFIX
+				dialog --visit-items --title "DNS Search Suffix" \
+					--inputbox "Please enter any domains which you would like to search on DNS queries (hit enter for none:)" \
+					20 50 2> ${iface}.SUFFIX
 				SUFFIX=$(tail -n 1 ${iface}.SUFFIX)
 				echo "nameserver ${DNS}" > /etc/resolv.conf
 				if [ -n "${SUFFIX}" ]
@@ -218,7 +245,9 @@ while true; do
 	show_ifmenu
 done
 
-dialog --visit-items --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings.  All questions below apply to the ${iface} interface only.  Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
+dialog --visit-items --title "Network setup" \
+	--menu "This script is designed to setup both wired and wireless network settings.  All questions below apply to the ${iface} interface only.  Choose one option:" \
+	20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
 WIRED_WIRELESS=$(tail -n 1 ${iface}.WIRED_WIRELESS)
 case ${WIRED_WIRELESS} in
 	1)


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2013-07-07 22:28 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2013-07-07 22:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2f9ad0cdfc8d53a227d9a90f16de0f3df33e07b7
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  7 22:26:02 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jul  7 22:26:02 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=2f9ad0cd

net-setup: remove code hiding error messages

net-setup was hiding error messages for no given reason, so this removes
the code that hides them.

---
 net-setup | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net-setup b/net-setup
index cde3ba6..4216787 100755
--- a/net-setup
+++ b/net-setup
@@ -201,9 +201,6 @@ fi
 
 livecd_check_root || exit 1
 
-# Hide any potential error messages from the readlink/dirname/etc calls below
-exec 2>/dev/null
-
 if [ -z "${1}" ]
 then
 	show_ifmenu
@@ -221,9 +218,6 @@ while true; do
 	show_ifmenu
 done
 
-# Show stderr again
-exec 2>/dev/stderr
-
 dialog --visit-items --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings.  All questions below apply to the ${iface} interface only.  Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
 WIRED_WIRELESS=$(tail -n 1 ${iface}.WIRED_WIRELESS)
 case ${WIRED_WIRELESS} in


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2013-07-06 23:53 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2013-07-06 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     00e84b95829d83398c4383ef897fc89e3aefe1a4
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  6 23:48:53 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jul  6 23:48:53 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=00e84b95

Move functions from livecd-functions.sh to net-setup

livecd_config_wireless, livecd_write_wireless_conf, livecd_config_ip,
livecd_write_net_conf, show_ifmenu and show_ifconfirm are only used in
net-setup, so this moves them into that script.

---
 livecd-functions.sh | 185 -------------------------------------------------
 net-setup           | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 190 insertions(+), 190 deletions(-)

diff --git a/livecd-functions.sh b/livecd-functions.sh
index cff4d08..1204835 100755
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -141,149 +141,6 @@ get_video_cards() {
 	fi
 }
 
-livecd_config_wireless() {
-	cd /tmp/setup.opts
-	dialog --visit-items --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID
-	SSID=$(tail -n 1 ${iface}.SSID)
-	if [ -n "${SSID}" ]
-	then
-		dialog --visit-items --title "WEP (Part 1)" --menu "Does your network use encryption?" 20 60 7 1 "Yes" 2 "No" 2> ${iface}.WEP
-		WEP=$(tail -n 1 ${iface}.WEP)
-		case ${WEP} in
-			1)
-				dialog --visit-items --title "WEP (Part 2)" --menu "Are you entering your WEP key in HEX or ASCII?" 20 60 7 1 "HEX" 2 "ASCII" 2> ${iface}.WEPTYPE
-				WEP_TYPE=$(tail -n 1 ${iface}.WEPTYPE)
-				case ${WEP_TYPE} in
-					1)
-						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in the form of XXXX-XXXX-XX for 64-bit or XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX for 128-bit" 20 50 2> ${iface}.WEPKEY
-						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
-						if [ -n "${WEP_KEY}" ]
-						then
-							iwconfig ${iface} essid "${SSID}"
-							iwconfig ${iface} key "${WEP_KEY}"
-						fi
-					;;
-					2)
-						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in ASCII form.  This should be 5 or 13 characters for either 64-bit or 128-bit encryption, repectively" 20 50 2> ${iface}.WEPKEY
-						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
-						if [ -n "${WEP_KEY}" ]
-						then
-							iwconfig ${iface} essid "${SSID}"
-							iwconfig ${iface} key "s:${WEP_KEY}"
-						fi
-					;;
-				esac
-			;;
-			2)
-				iwconfig ${iface} essid "${SSID}"
-				iwconfig ${iface} key off
-			;;
-		esac
-	fi
-}
-
-livecd_write_wireless_conf() {
-	cd /tmp/setup.opts
-	SSID=$(tail -n 1 ${iface}.SSID)
-	if [ -n "${SSID}" ]
-	then
-		echo "" >> /etc/conf.d/net
-		echo "# This wireless configuration file was built by net-setup" > /etc/conf.d/net
-		WEP=$(tail -n 1 ${iface}.WEPTYPE)
-		case ${WEP} in
-			1)
-				WEP_TYPE=$(tail -n 1 ${iface}.WEPTYPE)
-				if [ -n "${WEP_TYPE}" ]
-				then
-					WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
-					if [ -n "${WEP_KEY}" ]
-					then
-						SSID_TRANS=$(echo ${SSID//[![:word:]]/_})
-						case ${WEP_TYPE} in
-							1)
-								echo "key_${SSID_TRANS}=\"${WEP_KEY} enc open\"" >> /etc/conf.d/net
-							;;
-							2)
-								echo "key_${SSID_TRANS}=\"s:${WEP_KEY} enc open\"" >> /etc/conf.d/net
-							;;
-						esac
-					fi
-				fi
-			;;
-			2)
-				:
-			;;
-		esac
-		echo "preferred_aps=( \"${SSID}\" )" >> /etc/conf.d/net
-		echo "associate_order=\"forcepreferredonly\"" >> /etc/conf.d/net
-	fi
-}
-
-livecd_config_ip() {
-	cd /tmp/setup.opts
-	dialog --visit-items --title "TCP/IP setup" --menu "You can use DHCP to automatically configure a network interface or you can specify an IP and related settings manually. Choose one option:" 20 60 7 1 "Use DHCP to auto-detect my network settings" 2 "Specify an IP address manually" 2> ${iface}.DHCP
-	DHCP=$(tail -n 1 ${iface}.DHCP)
-	case ${DHCP} in
-		1)
-			/sbin/dhcpcd -n -t 10 -h $(hostname) ${iface} &
-		;;
-		2)
-			dialog --visit-items --title "IP address" --inputbox "Please enter an IP address for ${iface}:" 20 50 "192.168.1.1" 2> ${iface}.IP
-			IP=$(tail -n 1 ${iface}.IP)
-			BC_TEMP=$(echo $IP|cut -d . -f 1).$(echo $IP|cut -d . -f 2).$(echo $IP|cut -d . -f 3).255
-			dialog --visit-items --title "Broadcast address" --inputbox "Please enter a Broadcast address for ${iface}:" 20 50 "${BC_TEMP}" 2> ${iface}.BC
-			BROADCAST=$(tail -n 1 ${iface}.BC)
-			dialog --visit-items --title "Network mask" --inputbox "Please enter a Network Mask for ${iface}:" 20 50 "255.255.255.0" 2> ${iface}.NM
-			NETMASK=$(tail -n 1 ${iface}.NM)
-			dialog --visit-items --title "Gateway" --inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" 20 50 2> ${iface}.GW
-			GATEWAY=$(tail -n 1 ${iface}.GW)
-			dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS
-			DNS=$(tail -n 1 ${iface}.DNS)
-			ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
-			if [ -n "${GATEWAY}" ]
-			then
-				route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
-			fi
-			if [ -n "${DNS}" ]
-			then
-				dialog --visit-items --title "DNS Search Suffix" --inputbox "Please enter any domains which you would like to search on DNS queries (hit enter for none:)" 20 50 2> ${iface}.SUFFIX
-				SUFFIX=$(tail -n 1 ${iface}.SUFFIX)
-				echo "nameserver ${DNS}" > /etc/resolv.conf
-				if [ -n "${SUFFIX}" ]
-				then
-					echo "search ${SUFFIX}" >> /etc/resolv.conf
-				fi
-			fi
-		;;
-	esac
-}
-
-livecd_write_net_conf() {
-	cd /tmp/setup.opts
-	echo "" > /etc/conf.d/net
-	echo "# This network configuration was written by net-setup" > /etc/conf.d/net
-	DHCP=$(tail -n 1 ${iface}.DHCP)
-	case ${DHCP} in
-		1)
-			echo "config_${iface}=\"dhcp\"" >> /etc/conf.d/net
-		;;
-		2)
-			IP=$(tail -n 1 ${iface}.IP)
-			BROADCAST=$(tail -n 1 ${iface}.BC)
-			NETMASK=$(tail -n 1 ${iface}.NM)
-			GATEWAY=$(tail -n 1 ${iface}.GW)
-			if [ -n "${IP}" -a -n "${BROADCAST}" -a -n "${NETMASK}" ]
-			then
-				echo "config_${iface}=( \"${IP} broadcast ${BROADCAST} netmask ${NETMASK}\" )" >> /etc/conf.d/net
-				if [ -n "${GATEWAY}" ]
-				then
-					echo "routes_${iface}=( \"default via ${GATEWAY}\" )" >> /etc/conf.d/net
-				fi
-			fi
-		;;
-	esac
-}
-
 get_ifmac() {
 	local iface=$1
 
@@ -378,48 +235,6 @@ get_ifdesc() {
 	echo "Unknown"
 }
 
-show_ifmenu() {
-	local old_ifs="${IFS}"
-	local opts
-	IFS="
-"
-	for ifname in $(ifconfig -a | grep "^[^ ]"); do
-		ifname="${ifname%% *}"
-		[[ ${ifname} == "lo" ]] && continue
-		opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'"
-	done
-	IFS="${old_ifs}"
-
-	if ! eval dialog --visit-items --menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
-	then
-		exit
-	fi
-
-	iface=$(< iface)
-}
-
-show_ifconfirm() {
-	local iface=$1
-	local if_mac=$(get_ifmac ${iface})
-	local if_driver=$(get_ifdriver ${iface})
-	local if_bus=$(get_ifbus ${iface})
-	local if_product=$(get_ifproduct ${iface})
-
-	local text="Details for network interface ${iface} are shown below.\n\nInterface name: ${iface}\n"
-	[[ -n ${if_product} ]] && text="${text}Device: ${if_product}\n"
-	[[ -n ${if_mac} ]] && text="${text}MAC address: ${if_mac}\n"
-	[[ -n ${if_driver} ]] && text="${text}Driver: ${if_driver}\n"
-	[[ -n ${if_bus} ]] && text="${text}Bus type: ${if_bus}\n"
-	text="${text}\nIs this the interface that you wish to configure?"
-
-	if ! dialog --visit-items --title "Interface details" --yesno "${text}" 15 70
-	then
-		result="no"
-	else
-		result="yes"
-	fi
-}
-
 livecd_console_settings() {
 	# scan for a valid baud rate
 	case "$1" in

diff --git a/net-setup b/net-setup
index e81db2e..cde3ba6 100755
--- a/net-setup
+++ b/net-setup
@@ -1,5 +1,190 @@
 #!/bin/bash
 
+show_ifmenu() {
+	local old_ifs="${IFS}"
+	local opts
+	IFS="
+"
+	for ifname in $(ifconfig -a | grep "^[^ ]"); do
+		ifname="${ifname%% *}"
+		[[ ${ifname} == "lo" ]] && continue
+		opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'"
+	done
+	IFS="${old_ifs}"
+
+	if ! eval dialog --visit-items --menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
+	then
+		exit
+	fi
+
+	iface=$(< iface)
+}
+
+show_ifconfirm() {
+	local iface=$1
+	local if_mac=$(get_ifmac ${iface})
+	local if_driver=$(get_ifdriver ${iface})
+	local if_bus=$(get_ifbus ${iface})
+	local if_product=$(get_ifproduct ${iface})
+
+	local text="Details for network interface ${iface} are shown below.\n\nInterface name: ${iface}\n"
+	[[ -n ${if_product} ]] && text="${text}Device: ${if_product}\n"
+	[[ -n ${if_mac} ]] && text="${text}MAC address: ${if_mac}\n"
+	[[ -n ${if_driver} ]] && text="${text}Driver: ${if_driver}\n"
+	[[ -n ${if_bus} ]] && text="${text}Bus type: ${if_bus}\n"
+	text="${text}\nIs this the interface that you wish to configure?"
+
+	if ! dialog --visit-items --title "Interface details" --yesno "${text}" 15 70
+	then
+		result="no"
+	else
+		result="yes"
+	fi
+}
+
+config_wireless() {
+	cd /tmp/setup.opts
+	dialog --visit-items --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID
+	SSID=$(tail -n 1 ${iface}.SSID)
+	if [ -n "${SSID}" ]
+	then
+		dialog --visit-items --title "WEP (Part 1)" --menu "Does your network use encryption?" 20 60 7 1 "Yes" 2 "No" 2> ${iface}.WEP
+		WEP=$(tail -n 1 ${iface}.WEP)
+		case ${WEP} in
+			1)
+				dialog --visit-items --title "WEP (Part 2)" --menu "Are you entering your WEP key in HEX or ASCII?" 20 60 7 1 "HEX" 2 "ASCII" 2> ${iface}.WEPTYPE
+				WEP_TYPE=$(tail -n 1 ${iface}.WEPTYPE)
+				case ${WEP_TYPE} in
+					1)
+						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in the form of XXXX-XXXX-XX for 64-bit or XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX for 128-bit" 20 50 2> ${iface}.WEPKEY
+						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
+						if [ -n "${WEP_KEY}" ]
+						then
+							iwconfig ${iface} essid "${SSID}"
+							iwconfig ${iface} key "${WEP_KEY}"
+						fi
+					;;
+					2)
+						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in ASCII form.  This should be 5 or 13 characters for either 64-bit or 128-bit encryption, repectively" 20 50 2> ${iface}.WEPKEY
+						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
+						if [ -n "${WEP_KEY}" ]
+						then
+							iwconfig ${iface} essid "${SSID}"
+							iwconfig ${iface} key "s:${WEP_KEY}"
+						fi
+					;;
+				esac
+			;;
+			2)
+				iwconfig ${iface} essid "${SSID}"
+				iwconfig ${iface} key off
+			;;
+		esac
+	fi
+}
+
+config_ip() {
+	cd /tmp/setup.opts
+	dialog --visit-items --title "TCP/IP setup" --menu "You can use DHCP to automatically configure a network interface or you can specify an IP and related settings manually. Choose one option:" 20 60 7 1 "Use DHCP to auto-detect my network settings" 2 "Specify an IP address manually" 2> ${iface}.DHCP
+	DHCP=$(tail -n 1 ${iface}.DHCP)
+	case ${DHCP} in
+		1)
+			/sbin/dhcpcd -n -t 10 -h $(hostname) ${iface} &
+		;;
+		2)
+			dialog --visit-items --title "IP address" --inputbox "Please enter an IP address for ${iface}:" 20 50 "192.168.1.1" 2> ${iface}.IP
+			IP=$(tail -n 1 ${iface}.IP)
+			BC_TEMP=$(echo $IP|cut -d . -f 1).$(echo $IP|cut -d . -f 2).$(echo $IP|cut -d . -f 3).255
+			dialog --visit-items --title "Broadcast address" --inputbox "Please enter a Broadcast address for ${iface}:" 20 50 "${BC_TEMP}" 2> ${iface}.BC
+			BROADCAST=$(tail -n 1 ${iface}.BC)
+			dialog --visit-items --title "Network mask" --inputbox "Please enter a Network Mask for ${iface}:" 20 50 "255.255.255.0" 2> ${iface}.NM
+			NETMASK=$(tail -n 1 ${iface}.NM)
+			dialog --visit-items --title "Gateway" --inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" 20 50 2> ${iface}.GW
+			GATEWAY=$(tail -n 1 ${iface}.GW)
+			dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS
+			DNS=$(tail -n 1 ${iface}.DNS)
+			ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
+			if [ -n "${GATEWAY}" ]
+			then
+				route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
+			fi
+			if [ -n "${DNS}" ]
+			then
+				dialog --visit-items --title "DNS Search Suffix" --inputbox "Please enter any domains which you would like to search on DNS queries (hit enter for none:)" 20 50 2> ${iface}.SUFFIX
+				SUFFIX=$(tail -n 1 ${iface}.SUFFIX)
+				echo "nameserver ${DNS}" > /etc/resolv.conf
+				if [ -n "${SUFFIX}" ]
+				then
+					echo "search ${SUFFIX}" >> /etc/resolv.conf
+				fi
+			fi
+		;;
+	esac
+}
+
+write_wireless_conf() {
+	cd /tmp/setup.opts
+	SSID=$(tail -n 1 ${iface}.SSID)
+	if [ -n "${SSID}" ]
+	then
+		echo "" >> /etc/conf.d/net
+		echo "# This wireless configuration file was built by net-setup" > /etc/conf.d/net
+		WEP=$(tail -n 1 ${iface}.WEPTYPE)
+		case ${WEP} in
+			1)
+				WEP_TYPE=$(tail -n 1 ${iface}.WEPTYPE)
+				if [ -n "${WEP_TYPE}" ]
+				then
+					WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
+					if [ -n "${WEP_KEY}" ]
+					then
+						SSID_TRANS=$(echo ${SSID//[![:word:]]/_})
+						case ${WEP_TYPE} in
+							1)
+								echo "key_${SSID_TRANS}=\"${WEP_KEY} enc open\"" >> /etc/conf.d/net
+							;;
+							2)
+								echo "key_${SSID_TRANS}=\"s:${WEP_KEY} enc open\"" >> /etc/conf.d/net
+							;;
+						esac
+					fi
+				fi
+			;;
+			2)
+				:
+			;;
+		esac
+		echo "preferred_aps=( \"${SSID}\" )" >> /etc/conf.d/net
+		echo "associate_order=\"forcepreferredonly\"" >> /etc/conf.d/net
+	fi
+}
+
+write_net_conf() {
+	cd /tmp/setup.opts
+	echo "" > /etc/conf.d/net
+	echo "# This network configuration was written by net-setup" > /etc/conf.d/net
+	DHCP=$(tail -n 1 ${iface}.DHCP)
+	case ${DHCP} in
+		1)
+			echo "config_${iface}=\"dhcp\"" >> /etc/conf.d/net
+		;;
+		2)
+			IP=$(tail -n 1 ${iface}.IP)
+			BROADCAST=$(tail -n 1 ${iface}.BC)
+			NETMASK=$(tail -n 1 ${iface}.NM)
+			GATEWAY=$(tail -n 1 ${iface}.GW)
+			if [ -n "${IP}" -a -n "${BROADCAST}" -a -n "${NETMASK}" ]
+			then
+				echo "config_${iface}=( \"${IP} broadcast ${BROADCAST} netmask ${NETMASK}\" )" >> /etc/conf.d/net
+				if [ -n "${GATEWAY}" ]
+				then
+					echo "routes_${iface}=( \"default via ${GATEWAY}\" )" >> /etc/conf.d/net
+				fi
+			fi
+		;;
+	esac
+}
+
 if [ -f /sbin/livecd-functions.sh ]
 then
 	source /sbin/livecd-functions.sh
@@ -43,15 +228,15 @@ dialog --visit-items --title "Network setup" --menu "This script is designed to
 WIRED_WIRELESS=$(tail -n 1 ${iface}.WIRED_WIRELESS)
 case ${WIRED_WIRELESS} in
 	1)
-		livecd_config_wireless
-		livecd_config_ip
-		livecd_write_wireless_conf
+		config_wireless
+		config_ip
+		write_wireless_conf
 		;;
 	2)
-		livecd_config_ip
+		config_ip
 		;;
 esac
-livecd_write_net_conf
+write_net_conf
 
 echo "Type \"ifconfig\" to make sure the interface was configured correctly."
 


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2013-02-25 18:20 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2013-02-25 18:20 UTC (permalink / raw
  To: gentoo-commits

commit:     8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 25 18:14:13 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 25 18:14:13 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=8a840ff9

livecd-functions.sh: do not hard code the paths to lspci or iwconfig

Reported-by: jer <AT> gentoo.org
X-Gentoo-Bug: 454728
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454728

---
 livecd-functions.sh |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/livecd-functions.sh b/livecd-functions.sh
index c9febd9..cff4d08 100755
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -80,8 +80,7 @@ nv_no_gl() {
 }
 
 get_video_cards() {
-	[ -x /sbin/lspci ] && VIDEO_CARDS=$(/sbin/lspci | grep ' VGA ')
-	[ -x /usr/sbin/lspci ] && VIDEO_CARDS=$(/usr/sbin/lspci | grep ' VGA ')
+	VIDEO_CARDS=$(lspci | grep ' VGA ')
 	NUM_CARDS=$(echo ${VIDEO_CARDS} | wc -l)
 	if [ ${NUM_CARDS} -eq 1 ]
 	then
@@ -144,8 +143,6 @@ get_video_cards() {
 
 livecd_config_wireless() {
 	cd /tmp/setup.opts
-	[ -x /usr/sbin/iwconfig ] && iwconfig=/usr/sbin/iwconfig
-	[ -x /sbin/iwconfig ] && iwconfig=/sbin/iwconfig
 	dialog --visit-items --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID
 	SSID=$(tail -n 1 ${iface}.SSID)
 	if [ -n "${SSID}" ]
@@ -162,8 +159,8 @@ livecd_config_wireless() {
 						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
 						if [ -n "${WEP_KEY}" ]
 						then
-							${iwconfig} ${iface} essid "${SSID}"
-							${iwconfig} ${iface} key "${WEP_KEY}"
+							iwconfig ${iface} essid "${SSID}"
+							iwconfig ${iface} key "${WEP_KEY}"
 						fi
 					;;
 					2)
@@ -171,15 +168,15 @@ livecd_config_wireless() {
 						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
 						if [ -n "${WEP_KEY}" ]
 						then
-							${iwconfig} ${iface} essid "${SSID}"
-							${iwconfig} ${iface} key "s:${WEP_KEY}"
+							iwconfig ${iface} essid "${SSID}"
+							iwconfig ${iface} key "s:${WEP_KEY}"
 						fi
 					;;
 				esac
 			;;
 			2)
-				${iwconfig} ${iface} essid "${SSID}"
-				${iwconfig} ${iface} key off
+				iwconfig ${iface} essid "${SSID}"
+				iwconfig ${iface} key off
 			;;
 		esac
 	fi


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2013-02-25 17:48 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2013-02-25 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     7275be68300a33f9b9bd6716553de29b6c1326c7
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 25 17:47:24 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 25 17:47:24 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=7275be68

livecd-functions.sh: do not hard code the path to route

---
 livecd-functions.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/livecd-functions.sh b/livecd-functions.sh
index b1a73cb..c9febd9 100755
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -245,7 +245,7 @@ livecd_config_ip() {
 			ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
 			if [ -n "${GATEWAY}" ]
 			then
-				/sbin/route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
+				route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
 			fi
 			if [ -n "${DNS}" ]
 			then


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2013-02-25 17:48 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2013-02-25 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     717330c071c4f7efaca562c30f6de4dc2f085439
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 25 17:39:43 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 25 17:39:43 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=717330c0

livecd-functions.sh: do not hard code the path to ifconfig

Reported-by: fdbugs <AT> dupoux.com
X-Gentoo-Bug: 454728
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454728

---
 livecd-functions.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/livecd-functions.sh b/livecd-functions.sh
index 81e2f1a..b1a73cb 100755
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -242,7 +242,7 @@ livecd_config_ip() {
 			GATEWAY=$(tail -n 1 ${iface}.GW)
 			dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS
 			DNS=$(tail -n 1 ${iface}.DNS)
-			/sbin/ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
+			ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
 			if [ -n "${GATEWAY}" ]
 			then
 				/sbin/route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
@@ -386,7 +386,7 @@ show_ifmenu() {
 	local opts
 	IFS="
 "
-	for ifname in $(/sbin/ifconfig -a | grep "^[^ ]"); do
+	for ifname in $(ifconfig -a | grep "^[^ ]"); do
 		ifname="${ifname%% *}"
 		[[ ${ifname} == "lo" ]] && continue
 		opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'"


^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-06-30 20:31 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-06-30 20:31 UTC (permalink / raw
  To: gentoo-commits

commit:     9645e7f465a667bf920ec193498028f88e7f418e
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 20:29:56 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 20:29:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=9645e7f4

Revert "remove bashlogin"

This reverts commit 1058b90acbaa2550892cfe93c2cef8dad0e1cacd.

We still need this for serial lines.

---
 bashlogin |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/bashlogin b/bashlogin
new file mode 100755
index 0000000..ea9493a
--- /dev/null
+++ b/bashlogin
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+export HOME=/root
+cat /etc/motd 2>/dev/null
+cd /root
+[[ -e .bash_profile ]] && source .bash_profile
+exec -l /bin/bash -i



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-06-28 17:32 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-06-28 17:32 UTC (permalink / raw
  To: gentoo-commits

commit:     8e2a9c041c3a2b6f52093e4ed49a95bd3d16ec86
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 17:25:36 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 17:25:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=8e2a9c04

remove openglify

Openglify was used by mkxf86config. Since this tool is not needed with
modern x.org, it has been removed.

---
 openglify |   74 -------------------------------------------------------------
 1 files changed, 0 insertions(+), 74 deletions(-)

diff --git a/openglify b/openglify
deleted file mode 100755
index ff33bb5..0000000
--- a/openglify
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/bash
-
-# This script is designed to tweak the system for eselect-opengl
-
-# move symlinks to a malleable /etc/opengl directory.
-install -d test/lib/modules/extensions
-
-# First, we remove all of the symlinks, so we can point them to our own
-# /etc/opengl directory
-rm -f /usr/lib*/libGL{,core}.{a,so}* > /dev/null 2>&1
-rm -f /usr/lib*/xorg/modules/extensions/libglx* > /dev/null 2>&1
-
-# We start with the "default" libdir of /usr/lib
-if [ ! -h /usr/lib ]
-then
-	ln -sf /etc/opengl/lib/libGL.so /usr/lib/libGL.so
-	ln -sf /etc/opengl/lib/libGL.so.1 /usr/lib/libGL.so.1
-	ln -sf /etc/opengl/lib/libGLcore.so /usr/lib/libGLcore.so
-	ln -sf /etc/opengl/lib/libGLcore.so.1 /usr/lib/libGLcore.so.1
-	ln -sf /etc/opengl/lib/libGL.la /usr/lib/libGL.la
-fi
-
-# We then check for /usr/lib32
-if [ -d /usr/lib32 ]
-then
-	ln -sf /etc/opengl/lib32/libGL.so /usr/lib32/libGL.so
-	ln -sf /etc/opengl/lib32/libGL.so.1 /usr/lib32/libGL.so.1
-	ln -sf /etc/opengl/lib32/libGLcore.so /usr/lib32/libGLcore.so
-	ln -sf /etc/opengl/lib32/libGLcore.so.1 /usr/lib32/libGLcore.so.1
-	ln -sf /etc/opengl/lib32/libGL.la /usr/lib32/libGL.la
-fi
-
-# We create symlinks for the libglx.so and libglx.a
-if [ -d /usr/lib64/xorg/modules/extensions ]
-then
-	ln -sf /etc/opengl/lib64/modules/extensions/libglx.so \
-		/usr/lib/xorg/modules/extensions/libglx.so
-	ln -sf /etc/opengl/lib64/modules/extensions/libglx.a \
-		/usr/lib/xorg/modules/extensions/libglx.a
-elif [ -d /usr/lib64/modules/extensions ]
-then
-	ln -sf /etc/opengl/lib64/modules/extensions/libglx.so \
-		/usr/lib64/modules/extensions/libglx.so
-	ln -sf /etc/opengl/lib64/modules/extensions/libglx.a \
-		/usr/lib64/modules/extensions/libglx.a
-fi
-# Do the same for 32-bit
-if [ -d /usr/lib32/xorg/modules/extensions ]
-then
-	ln -sf /etc/opengl/lib32/modules/extensions/libglx.so \
-		/usr/lib32/xorg/modules/extensions/libglx.so
-	ln -sf /etc/opengl/lib32/modules/extensions/libglx.a \
-		/usr/lib32/xorg/modules/extensions/libglx.a
-elif [ -d /usr/lib32/modules/extensions ]
-then
-	ln -sf /etc/opengl/lib32/modules/extensions/libglx.so \
-		/usr/lib32/modules/extensions/libglx.so
-	ln -sf /etc/opengl/lib32/modules/extensions/libglx.a \
-		/usr/lib32/modules/extensions/libglx.a
-fi
-# Do it for non-multilib
-if [ -d /usr/lib/xorg/modules/extensions ]
-then
-	ln -sf /etc/opengl/lib/modules/extensions/libglx.so \
-		/usr/lib/xorg/modules/extensions/libglx.so
-	ln -sf /etc/opengl/lib/modules/extensions/libglx.a \
-		/usr/lib/xorg/modules/extensions/libglx.a
-elif [ -d /usr/lib/modules/extensions ]
-then
-	ln -sf /etc/opengl/lib/modules/extensions/libglx.so \
-		/usr/lib/modules/extensions/libglx.so
-	ln -sf /etc/opengl/lib/modules/extensions/libglx.a \
-		/usr/lib/modules/extensions/libglx.a
-fi



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     3ca14c1c816e098e0ce8719ab962a01d51e8462a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 19:22:31 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=3ca14c1c

start xdm from autoconfig

We need to start xdm ourselves instead of allowing it to start in the
default order. This allows us to not start it when X is not requested by
the user or when speakup or brltty is requested.

---
 autoconfig |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/autoconfig b/autoconfig
index 3d3c71f..9eec5ce 100755
--- a/autoconfig
+++ b/autoconfig
@@ -278,6 +278,7 @@ list_services() {
 	svcs="${svcs} $(check_svc ${PASSWD} pwgen)"
 	svcs="${svcs} $(check_svc ${PCMCIA} pcmcia)"
 	svcs="${svcs} $(check_svc ${SSHD} sshd)"
+	svcs="${svcs} $(check_svc ${X11} xdm)"
 
 	### TODO: make this baselayout-2 compatible
 	### TODO: make these checks accurate using service dependencies
@@ -602,11 +603,6 @@ start() {
 
 	[ -n "${XDESC}" ] && einfo "VideoCard:   ${HILITE}${XDESC}${NORMAL}"
 
-	if ! yesno "${X11}"
-	then
-		touch /etc/.noxdm
-	fi
-
 	killall hwsetup 2>/dev/null
 	echo "6" > /proc/sys/kernel/printk
 }



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     34f8996145d9532a4872def3c040a2761254cf1e
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 07:19:37 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=34f89961

fixinittab should start after dev

---
 fixinittab |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fixinittab b/fixinittab
index cadaeb0..b7af2dd 100755
--- a/fixinittab
+++ b/fixinittab
@@ -2,7 +2,7 @@
 
 depend()
 {
-	before dev
+	after dev
 }
 
 start()



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c9339f3edfc9a5faec3c253a65ab8914231f53c8
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 20:00:01 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=c9339f3e

adjust fixinittab

Fixinittab belongs in the boot runlevel and should start after the root
file system is mounted.
Also this commit makes fixinittab slightly more verbose.

---
 fixinittab |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fixinittab b/fixinittab
index b7af2dd..c65fcdc 100755
--- a/fixinittab
+++ b/fixinittab
@@ -2,7 +2,7 @@
 
 depend()
 {
-	after dev
+	after root
 }
 
 start()
@@ -12,6 +12,7 @@ start()
 		return 1
 	fi
 
+	einfo "adjusting inittab"
 	# Create a backup
 	cp -f /etc/inittab /etc/inittab.old
 
@@ -64,7 +65,6 @@ start()
 			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin 9600 hvc0 vt320" >> /etc/inittab
 		fi
 
-
 	# The rest...
 	else
 		if [ "${LIVECD_CONSOLE}" = "tty0" -o "${LIVECD_CONSOLE}" = "" ]
@@ -96,5 +96,7 @@ start()
 
 	# force reread of inittab
 	telinit q
+
+	eend 0
 	return 0
 }



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     0de22860e2f9188205044668ded2400cb81dda9a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 06:31:46 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=0de22860

fix typo

---
 fixinittab |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fixinittab b/fixinittab
index b68be31..cadaeb0 100755
--- a/fixinittab
+++ b/fixinittab
@@ -1,4 +1,4 @@
-#!/bin/runscript
+#!/sbin/runscript
 
 depend()
 {



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     2778869c6397a8845bdd60523fe2a45b17456778
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 22:14:32 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=2778869c

load speakup modules in depend function

---
 autoconfig |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/autoconfig b/autoconfig
index ed588d6..3d3c71f 100755
--- a/autoconfig
+++ b/autoconfig
@@ -201,6 +201,13 @@ get_config() {
 }
 
 depend() {
+	get_config
+
+	if yesno "${SPEAKUP}"
+	then
+		modprobe ${SPEAKUP_MODULE} ${SPEAKUP_OPTIONS} > /dev/null 2>&1
+	fi
+
 	need modules $(list_services)
 	before net
 }
@@ -255,11 +262,6 @@ list_services() {
 		esac
 	fi
 
-	if yesno "${SPEAKUP}"
-	then
-		modprobe ${SPEAKUP_MODULE} ${SPEAKUP_OPTIONS} 2> /dev/null
-	fi
-
 	local svcs="$(check_svc ${ACPI} acpid)"
 	svcs="${svcs} $(check_svc ${ALSA} alsasound)"
 	svcs="${svcs} $(check_svc ${ALSA} unmute)"



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     a54994b75a31daeadd55861255b2e50e8246db43
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 02:12:53 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=a54994b7

update sound and software speech handling

migrate unmute code to a separate script. Also migrate the espeakup
service to the list_services function.

---
 autoconfig |   47 +++++------------------------------------------
 unmute     |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 42 deletions(-)

diff --git a/autoconfig b/autoconfig
index 06be5f1..32fff56 100755
--- a/autoconfig
+++ b/autoconfig
@@ -257,6 +257,11 @@ list_services() {
 
 	local svcs="$(check_svc ${ACPI} acpid)"
 	svcs="${svcs} $(check_svc ${ALSA} alsasound)"
+	svcs="${svcs} $(check_svc ${ALSA} unmute)"
+	if [ "${SPEAKUP_MODULE}" = "speakup_soft" ]  && rc-service -e espeakup
+	then
+		svcs="${svcs} espeakup"
+	fi
 	svcs="${svcs} $(check_svc ${APM} apmd)"
 	svcs="${svcs} $(check_svc ${BRLTTY} brltty)"
 	svcs="${svcs} $(check_svc ${COLDPLUG} coldplug hotplug)"
@@ -588,48 +593,6 @@ start() {
 				&& einfo "              ${WARN}${SOUND_FULLNAME}  "
 			[ -n "${SOUND_DRIVER}" ] \
 				&& einfo "              driver = ${SOUND_DRIVER}"
-
-			if [ -e /proc/asound/cards ]
-			then
-				for i in $(cat /proc/asound/cards | awk '{print $1}' | grep ^[[:digit:]])
-				do
-					if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ]
-					then
-						amixer -c $i scontrols > /etc/amixer
-						[ -n "$(grep Master /etc/amixer)" ] \
-							&& amixer -c $i -q set Master 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep Front /etc/amixer)" ] \
-							&& amixer -c $i -q set Front 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep HDMI /etc/amixer)" ] \
-							&& amixer -c $i -q set HDMI 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep IEC958 /etc/amixer)" ] \
-							&& amixer -c $i -q set IEC958 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep PCM /etc/amixer)" ] \
-							&& amixer -c $i -q set PCM 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep Speaker /etc/amixer)" ] \
-							&& amixer -c $i -q set Speaker 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep Mic /etc/amixer)" ] \
-							&& amixer -c $i -q set Mic 95% mute cap \
-							>/dev/null 2>&1
-						[ -n "$(grep Wave /etc/amixer)" ] \
-							&& amixer -c $i -q set Wave 95% unmute \
-							>/dev/null 2>&1
-						[ -n "$(grep Capture /etc/amixer)" ] \
-							&& amixer -c $i -q set Capture 95% unmute cap \
-							>/dev/null 2>&1
-					fi
-				done
-
-				if [ "${SPEAKUP_MODULE}" = "speakup_soft" ]
-				then
-					rc-service -i espeakup start
-				fi
 			fi
 		fi
 	else

diff --git a/unmute b/unmute
new file mode 100755
index 0000000..7e73c83
--- /dev/null
+++ b/unmute
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+
+depend()
+{
+	need alsasound
+}
+
+start()
+{
+	if [ -e /proc/asound/cards ]
+	then
+		for i in $(cat /proc/asound/cards | awk '{print $1}' | grep ^[[:digit:]])
+		do
+			einfo "unmuting sound card $i"
+			if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ]
+			then
+				amixer -c $i scontrols > /etc/amixer
+				[ -n "$(grep Master /etc/amixer)" ] \
+					&& amixer -c $i -q set Master 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep Front /etc/amixer)" ] \
+					&& amixer -c $i -q set Front 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep HDMI /etc/amixer)" ] \
+					&& amixer -c $i -q set HDMI 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep IEC958 /etc/amixer)" ] \
+					&& amixer -c $i -q set IEC958 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep PCM /etc/amixer)" ] \
+					&& amixer -c $i -q set PCM 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep Speaker /etc/amixer)" ] \
+					&& amixer -c $i -q set Speaker 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep Mic /etc/amixer)" ] \
+					&& amixer -c $i -q set Mic 95% mute cap \
+					>/dev/null 2>&1
+				[ -n "$(grep Wave /etc/amixer)" ] \
+					&& amixer -c $i -q set Wave 95% unmute \
+					>/dev/null 2>&1
+				[ -n "$(grep Capture /etc/amixer)" ] \
+					&& amixer -c $i -q set Capture 95% unmute cap \
+					>/dev/null 2>&1
+			fi
+		done
+	fi
+	return 0
+}



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     d4de54b7e4af5ad5ba3310ff8248f9bb876b5b4c
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 23:45:14 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=d4de54b7

remove hal support

---
 autoconfig |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/autoconfig b/autoconfig
index 4fb083b..565400a 100755
--- a/autoconfig
+++ b/autoconfig
@@ -14,7 +14,6 @@ DMRAID="yes"
 EVMS="no"
 FIREWIRE="yes"
 GPM="yes"
-HALD="yes"
 IDEDMA="yes"
 LVM="no"
 MDADM="yes"
@@ -48,7 +47,6 @@ get_config() {
 				EVMS="no"
 				FIREWIRE="no"
 				GPM="no"
-				HALD="no"
 				LVM="no"
 				MDADM="no"
 				NET="no"
@@ -263,7 +261,6 @@ list_services() {
 	svcs="${svcs} $(check_svc ${BRLTTY} brltty)"
 	svcs="${svcs} $(check_svc ${COLDPLUG} coldplug hotplug)"
 	svcs="${svcs} $(check_svc ${GPM} gpm)"
-	svcs="${svcs} $(check_svc ${HALD} hald)"
 	svcs="${svcs} $(check_svc ${IDEDMA} hdparm)"
 	svcs="${svcs} $(check_svc ${NFS} nfsmount)"
 	svcs="${svcs} $(check_svc ${PASSWD} pwgen)"



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     594feca48d641239db2a767abd780a4982efb33f
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 04:33:09 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=594feca4

fix typo

---
 autoconfig |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/autoconfig b/autoconfig
index 32fff56..5a9c679 100755
--- a/autoconfig
+++ b/autoconfig
@@ -593,7 +593,6 @@ start() {
 				&& einfo "              ${WARN}${SOUND_FULLNAME}  "
 			[ -n "${SOUND_DRIVER}" ] \
 				&& einfo "              driver = ${SOUND_DRIVER}"
-			fi
 		fi
 	else
 		ewarn "Skipping ALSA detection as requested on command line ..."



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     a6b7a2fba100b1f46cab4cbef331171fff579cbb
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 05:31:11 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=a6b7a2fb

load speakup module before espeakup is run

This change will make sure that the speakup module is loaded into memory
before espeakup is run in case the user wants to use software speech.

---
 autoconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/autoconfig b/autoconfig
index 5a9c679..ed588d6 100755
--- a/autoconfig
+++ b/autoconfig
@@ -255,6 +255,11 @@ list_services() {
 		esac
 	fi
 
+	if yesno "${SPEAKUP}"
+	then
+		modprobe ${SPEAKUP_MODULE} ${SPEAKUP_OPTIONS} 2> /dev/null
+	fi
+
 	local svcs="$(check_svc ${ACPI} acpid)"
 	svcs="${svcs} $(check_svc ${ALSA} alsasound)"
 	svcs="${svcs} $(check_svc ${ALSA} unmute)"
@@ -405,11 +410,6 @@ start() {
 	echo "0" > /proc/sys/kernel/printk
 	get_config
 
-	if yesno "${SPEAKUP}"
-	then
-		modprobe ${SPEAKUP_MODULE} ${SPEAKUP_OPTIONS}
-	fi
-
 	if yesno "${DETECT}"
 	then
 		ebegin "Hardware detection started"



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     69356097f4e72c528e293858993ec8dddea321a2
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 00:40:47 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=69356097

fix message for sound card

The original message used \n for new lines, but einfo doesn't honor
these in openrc.

---
 autoconfig |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/autoconfig b/autoconfig
index 565400a..06be5f1 100755
--- a/autoconfig
+++ b/autoconfig
@@ -582,14 +582,12 @@ start() {
 	then
 		if [ -n "${SOUND_FULLNAME}" -o -n "${SOUND_DRIVER}" ]
 		then
-			local sndmsg="Soundcard:\n"
+			einfo "Soundcard:  "
 
 			[ -n "${SOUND_FULLNAME}" ] \
-				&& sndmsg="${sndmsg}              ${WARN}${SOUND_FULLNAME}\n"
+				&& einfo "              ${WARN}${SOUND_FULLNAME}  "
 			[ -n "${SOUND_DRIVER}" ] \
-				&& sndmsg="${sndmsg}              driver = ${SOUND_DRIVER}\n"
-
-			einfo "${sndmsg}"
+				&& einfo "              driver = ${SOUND_DRIVER}"
 
 			if [ -e /proc/asound/cards ]
 			then



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     9b4871770ed2be5f3980a0a7b83c529254a69fd0
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 21:13:09 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=9b487177

migrate most services to the list_services function

---
 autoconfig |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/autoconfig b/autoconfig
index 4e45702..4fb083b 100755
--- a/autoconfig
+++ b/autoconfig
@@ -268,7 +268,7 @@ list_services() {
 	svcs="${svcs} $(check_svc ${NFS} nfsmount)"
 	svcs="${svcs} $(check_svc ${PASSWD} pwgen)"
 	svcs="${svcs} $(check_svc ${PCMCIA} pcmcia)"
-	svcs="${svcs} $(check_svc ${SSH} sshd)"
+	svcs="${svcs} $(check_svc ${SSHD} sshd)"
 
 	### TODO: make this baselayout-2 compatible
 	### TODO: make these checks accurate using service dependencies
@@ -504,17 +504,13 @@ start() {
 		einfo "Not Loading ACPI support ..."
 	fi
 
-	if yesno "${IDEDMA}" && ! service_started hdparm
+	if ! yesno "${IDEDMA}"
 	then
-		rc-service -i hdparm start
-	else
 		ewarn "Disabling IDE DMA support ..."
 	fi
 
-	if yesno "${PCMCIA}" && ! service_started pcmcia
+	if ! yesno "${PCMCIA}"
 	then
-		rc-service -i pcmcia start
-	else
 		ewarn "PCMCIA disabled via cmdline ..."
 	fi
 
@@ -567,15 +563,9 @@ start() {
 				fi
 			fi
 		done
-		if yesno "${NFS}" && ! service_started nfsmount
-		then
-			rc-service -i nfsmount start
-		fi
 		if ! yesno "${PASSWD}"
 		then
 			echo "root:${PASSWORD}" | chpasswd  > /dev/null 2>&1
-		elif ! service_started pwgen
-			rc-service -i pwgen start
 		fi
 		if yesno "${SSHD}"
 		then
@@ -586,7 +576,6 @@ start() {
 				ewarn "WARNING: You are starting sshd with a scrambled root password!!!"
 				ewarn "WARNING: You need to set a root password to be able to login remotely."
 			fi
-			rc-service -i sshd start
 		fi
 	else
 		ewarn "No Network device auto detected ..."
@@ -605,11 +594,6 @@ start() {
 
 			einfo "${sndmsg}"
 
-			if ! service_started alsasound
-			then
-				rc-service -i alsasound start
-			fi
-
 			if [ -e /proc/asound/cards ]
 			then
 				for i in $(cat /proc/asound/cards | awk '{print $1}' | grep ^[[:digit:]])



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     5a3f139a9c28368cc7283f982acba94ea09dc5a1
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 22:13:36 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=5a3f139a

add fixinittab service

This is a port of the fix_inittab function from baselayout-1's version
of the livecd-tools. In openrc it is set up as a service which should
be added to the sysinit runlevel.

---
 fixinittab          |  100 +++++++++++++++++++++++++++++++++++++++++++++++++++
 livecd-functions.sh |   93 -----------------------------------------------
 2 files changed, 100 insertions(+), 93 deletions(-)

diff --git a/fixinittab b/fixinittab
new file mode 100755
index 0000000..b68be31
--- /dev/null
+++ b/fixinittab
@@ -0,0 +1,100 @@
+#!/bin/runscript
+
+depend()
+{
+	before dev
+}
+
+start()
+{
+	if [ "${CDBOOT}" = "" ]
+	then
+		return 1
+	fi
+
+	# Create a backup
+	cp -f /etc/inittab /etc/inittab.old
+
+	# Comment out current getty settings
+	sed -i -e '/^c[0-9]/ s/^/#/' /etc/inittab
+	sed -i -e '/^s[01]/ s/^/#/' /etc/inittab
+
+	# SPARC & HPPA console magic
+	if [ "${HOSTTYPE}" = "sparc" -o "${HOSTTYPE}" = "hppa" -o "${HOSTTYPE}" = "ppc64" ]
+	then
+		# Mount openprom tree for user debugging purposes
+		if [ "${HOSTTYPE}" = "sparc" ]
+		then
+			mount -t openpromfs none /proc/openprom
+		fi
+
+		# SPARC serial port A, HPPA mux / serial
+		if [ -c "/dev/ttyS0" ]
+		then
+			LIVECD_CONSOLE_BAUD=$(stty -F /dev/ttyS0 speed)
+			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${LIVECD_CONSOLE_BAUD} ttyS0 vt100" >> /etc/inittab
+		fi
+		# HPPA software PDC console (K-models)
+		if [ "${LIVECD_CONSOLE}" = "ttyB0" ]
+		then
+			mknod /dev/ttyB0 c 11 0
+			LIVECD_CONSOLE_BAUD=$(stty -F /dev/ttyB0 speed)
+			echo "b0:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${LIVECD_CONSOLE_BAUD} ttyB0 vt100" >> /etc/inittab
+		fi
+		# FB / STI console
+		if [ -c "/dev/vc/1" -o -c "/dev/tts/1" -o -c "/dev/tty2" ]
+		then
+			MODEL_NAME=$(cat /proc/cpuinfo |grep "model name"|sed 's/.*: //')
+			if [ "${MODEL_NAME}" = "UML" ]
+			then
+			    for x in 0 1 2 3 4 5 6
+			    do
+				    echo "c${x}:12345:respawn:/sbin/mingetty --noclear --autologin root tty${x}" >> /etc/inittab
+			    done
+			else
+			    for x in 1 2 3 4 5 6
+			    do
+				    echo "c${x}:12345:respawn:/sbin/mingetty --noclear --autologin root tty${x}" >> /etc/inittab
+			    done
+			fi
+		fi
+		if [ -c "/dev/hvc0" ]
+		then
+			einfo "Adding hvc console to inittab"
+			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin 9600 hvc0 vt320" >> /etc/inittab
+		fi
+
+
+	# The rest...
+	else
+		if [ "${LIVECD_CONSOLE}" = "tty0" -o "${LIVECD_CONSOLE}" = "" ]
+		then
+			for x in 1 2 3 4 5 6
+			do
+				echo "c${x}:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty${x} linux" >> /etc/inittab
+			done
+		else
+			einfo "Adding ${LIVECD_CONSOLE} console to inittab"
+			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${LIVECD_CONSOLE_BAUD} ${LIVECD_CONSOLE} vt100" >> /etc/inittab
+		fi
+	fi
+
+	# EFI-based machines should automatically hook up their console lines
+	if dmesg | grep -q '^Adding console on'
+	then
+		dmesg | grep '^Adding console on' | while read x; do
+			line=`echo "$x" | cut -d' ' -f4`
+			id=e`echo "$line" | grep -o '.\{1,3\}$'`
+			[ "${line}" = "${LIVECD_CONSOLE}" ] && continue  # already setup above
+			case "$x" in
+				*options\ \'[0-9]*) speed=`echo "$x" | sed "s/.*options '//; s/[^0-9].*//"` ;;
+				*) speed=9600 ;;  # choose a default, only matters if it is serial
+			esac
+			echo "$id:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${speed} ${line} vt100" >> /etc/inittab
+		done
+	fi
+
+	# force reread of inittab
+	telinit q
+	return 0
+}

diff --git a/livecd-functions.sh b/livecd-functions.sh
index 5eac162..81e2f1a 100755
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -538,96 +538,3 @@ livecd_read_commandline() {
 	done
 	return 0
 }
-
-livecd_fix_inittab() {
-	if [ "${CDBOOT}" = "" ]
-	then
-		return 1
-	fi
-
-	# Create a backup
-	cp -f /etc/inittab /etc/inittab.old
-
-	# Comment out current getty settings
-	sed -i -e '/^c[0-9]/ s/^/#/' /etc/inittab
-	sed -i -e '/^s[01]/ s/^/#/' /etc/inittab
-
-	# SPARC & HPPA console magic
-	if [ "${HOSTTYPE}" = "sparc" -o "${HOSTTYPE}" = "hppa" -o "${HOSTTYPE}" = "ppc64" ]
-	then
-		# Mount openprom tree for user debugging purposes
-		if [ "${HOSTTYPE}" = "sparc" ]
-		then
-			mount -t openpromfs none /proc/openprom
-		fi
-
-		# SPARC serial port A, HPPA mux / serial
-		if [ -c "/dev/ttyS0" ]
-		then
-			LIVECD_CONSOLE_BAUD=$(stty -F /dev/ttyS0 speed)
-			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${LIVECD_CONSOLE_BAUD} ttyS0 vt100" >> /etc/inittab
-		fi
-		# HPPA software PDC console (K-models)
-		if [ "${LIVECD_CONSOLE}" = "ttyB0" ]
-		then
-			mknod /dev/ttyB0 c 11 0
-			LIVECD_CONSOLE_BAUD=$(stty -F /dev/ttyB0 speed)
-			echo "b0:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${LIVECD_CONSOLE_BAUD} ttyB0 vt100" >> /etc/inittab
-		fi
-		# FB / STI console
-		if [ -c "/dev/vc/1" -o -c "/dev/tts/1" -o -c "/dev/tty2" ]
-		then
-			MODEL_NAME=$(cat /proc/cpuinfo |grep "model name"|sed 's/.*: //')
-			if [ "${MODEL_NAME}" = "UML" ]
-			then
-			    for x in 0 1 2 3 4 5 6
-			    do
-				    echo "c${x}:12345:respawn:/sbin/mingetty --noclear --autologin root tty${x}" >> /etc/inittab
-			    done
-			else
-			    for x in 1 2 3 4 5 6
-			    do
-				    echo "c${x}:12345:respawn:/sbin/mingetty --noclear --autologin root tty${x}" >> /etc/inittab
-			    done
-			fi
-		fi
-		if [ -c "/dev/hvc0" ]
-		then
-			einfo "Adding hvc console to inittab"
-			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin 9600 hvc0 vt320" >> /etc/inittab
-		fi
-
-
-	# The rest...
-	else
-		if [ "${LIVECD_CONSOLE}" = "tty0" -o "${LIVECD_CONSOLE}" = "" ]
-		then
-			for x in 1 2 3 4 5 6
-			do
-				echo "c${x}:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty${x} linux" >> /etc/inittab
-			done
-		else
-			einfo "Adding ${LIVECD_CONSOLE} console to inittab"
-			echo "s0:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${LIVECD_CONSOLE_BAUD} ${LIVECD_CONSOLE} vt100" >> /etc/inittab
-		fi
-	fi
-
-	# EFI-based machines should automatically hook up their console lines
-	if dmesg | grep -q '^Adding console on'
-	then
-		dmesg | grep '^Adding console on' | while read x; do
-			line=`echo "$x" | cut -d' ' -f4`
-			id=e`echo "$line" | grep -o '.\{1,3\}$'`
-			[ "${line}" = "${LIVECD_CONSOLE}" ] && continue  # already setup above
-			case "$x" in
-				*options\ \'[0-9]*) speed=`echo "$x" | sed "s/.*options '//; s/[^0-9].*//"` ;;
-				*) speed=9600 ;;  # choose a default, only matters if it is serial
-			esac
-			echo "$id:12345:respawn:/sbin/agetty -nl /bin/bashlogin ${speed} ${line} vt100" >> /etc/inittab
-		done
-	fi
-
-	# force reread of inittab
-	kill -HUP 1
-	return 0
-}



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     45bdec0684928a6c4eb82bee8a14e9908d091d5b
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 22:32:55 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=45bdec06

Revert "fix dependency in fixinittab"

This reverts commit e138bb5166f3cf0076669e9b1e2a6049d8c6e593.

Fixinittab can be started in sysinit, with "before dev" as part of the
dependencies, the way I had it set up before. procfs does not mount
/proc.

---
 fixinittab |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fixinittab b/fixinittab
index d5dddc6..b68be31 100755
--- a/fixinittab
+++ b/fixinittab
@@ -2,7 +2,7 @@
 
 depend()
 {
-	after procfs
+	before dev
 }
 
 start()



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     839b7cfab961f770683f8db713ed2cec4acce0b9
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 22:26:06 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=839b7cfa

fix dependency in fixinittab

fixinittab should go in the boot runlevel, not sysinit, and it should
run after procfs.

---
 fixinittab |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fixinittab b/fixinittab
index b68be31..d5dddc6 100755
--- a/fixinittab
+++ b/fixinittab
@@ -2,7 +2,7 @@
 
 depend()
 {
-	before dev
+	after procfs
 }
 
 start()



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     9b04b7cd79339b6da867fd42718620215896c21c
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 17:42:33 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=9b04b7cd

fix typo

---
 autoconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/autoconfig b/autoconfig
index d8df734..f7d3284 100755
--- a/autoconfig
+++ b/autoconfig
@@ -215,7 +215,7 @@ check_svc() {
 		if rc-service -e "${2}"
 		then
 			echo "${2}"
-		elif [ -n "${3}" ] && rc-service -e ${3}"
+		elif [ -n "${3}" ] && rc-service -e "${3}"
 		then
 			echo "${3}"
 		fi	



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     ab953ae618dfdafc8effcde9de39c2d99b052c58
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 21:07:14 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=ab953ae6

Ensure /lib/firmware exists before we try to extract into it.

---
 autoconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/autoconfig b/autoconfig
index e8f7123..4e45702 100755
--- a/autoconfig
+++ b/autoconfig
@@ -281,6 +281,7 @@ unpack_firmware() {
 	if [ -e /lib/firmware.tar.bz2 ]
 	then
 		ebegin "Unpacking firmware"
+		mkdir -p /lib/firmware
 		tar xjf /lib/firmware.tar.bz2 -C /lib/firmware
 		eend 0
 	fi



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b9a41aa1f452f6190b6b3ec85137422e4d5f732f
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 20:35:47 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=b9a41aa1

Document authorship.

---
 AUTHORS |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index a3b0ae0..fe9c49b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,10 +1,13 @@
-This list is split into two alphabetical lists.  The first is a listing of the
-authors of the original Gentoo package.  The copyrights for all of those code
-contributions belong to the Gentoo Foundation.  The second list is the authors
-whom have contributed significant code to the new project.  All code added to
+This list is split into two alphabetical lists. The first is a listing of the
+authors of the original Gentoo package. The copyrights for all of those code
+contributions belong to the Gentoo Foundation. The second list is the authors
+whom have contributed significant code to the new project. All code added to
 the new project is copyrighted by the respective authors.
 
-Gentoo Foundation authors:
+The above paragraph was true until Dec 26, 2009. Then there was a period of
+hiatus and on Feb 10, 2011 development was resumed inside Gentoo.
+
+Original Gentoo Foundation authors:
 ------
 Andrew Gaffney <agaffney@gentoo.org>
 Chris Gianelloni <wolf31o2@gentoo.org>
@@ -19,9 +22,12 @@ Daniel Ostrow <dostrow@gentoo.org>
 Lars Weiler <pylon@gentoo.org>
 Gustavo Zacarias <gustavoz@gentoo.org>
 
-
 Copyright authors:
 ------
 Andrew Gaffney <agaffney@gentoo.org>
 Chris Gianelloni <wolf31o2@wolf31o2.org>
 
+2011-onwards Gentoo authors:
+------
+William Hubbs <williamh@gentoo.org>
+Robin H. Johnson <robbat2@gentoo.org>



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     7fb9d73581d11d43b64eff49b63ac2ff2d4d8e5f
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 20:16:54 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=7fb9d735

more openrc related fixes

- make sure hardware services are not running before we start them.
- convert some tests to use yesno instead of comparisons to "yes" or
  "no".

---
 autoconfig |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/autoconfig b/autoconfig
index f7d3284..e8f7123 100755
--- a/autoconfig
+++ b/autoconfig
@@ -474,7 +474,10 @@ start() {
 	then
 		modprobe apm power_off=1 >/dev/null 2>&1 && \
 			einfo "APM BIOS found, power management functions enabled ..."
-		rc-service -i apmd start
+		if ! service_started apmd
+		then
+			rc-service -i apmd start
+		fi
 	else
 		einfo "Not Loading APM Bios support ..."
 	fi
@@ -491,20 +494,23 @@ start() {
 		modprobe thermal >/dev/null 2>&1
 		modprobe video >/dev/null 2>&1
 		modprobe dock >/dev/null 2>&1
-		rc-service -i acpid start
+		if ! service_started acpid
+		then
+			rc-service -i acpid start
+		fi
 		eend
 	else
 		einfo "Not Loading ACPI support ..."
 	fi
 
-	if yesno "${IDEDMA}"
+	if yesno "${IDEDMA}" && ! service_started hdparm
 	then
 		rc-service -i hdparm start
 	else
 		ewarn "Disabling IDE DMA support ..."
 	fi
 
-	if yesno "${PCMCIA}"
+	if yesno "${PCMCIA}" && ! service_started pcmcia
 	then
 		rc-service -i pcmcia start
 	else
@@ -535,9 +541,12 @@ start() {
 		# Migrated to autoconfig-gpm-pre
 	fi
 
-	[ "${DETECT}" = "no" ] && DHCP="no"
-	[ "${DETECT}" = "yes" ] \
-		&& NETDEVICES="$(awk -F: '/eth.:|tr.:|ath.:|wlan.:/{print $1}' /proc/net/dev 2>/dev/null)"
+	if yesno "${DETECT}"
+	then
+		NETDEVICES="$(awk -F: '/eth.:|tr.:|ath.:|wlan.:/{print $1}' /proc/net/dev 2>/dev/null)"
+	else
+		DHCP="no"
+	fi
 
 	if [ -n "${NETDEVICES}" ]
 	then
@@ -557,16 +566,15 @@ start() {
 				fi
 			fi
 		done
-		if yesno "${NFS}"
+		if yesno "${NFS}" && ! service_started nfsmount
 		then
-			rc-service -i portmap start
 			rc-service -i nfsmount start
 		fi
 		if ! yesno "${PASSWD}"
 		then
 			echo "root:${PASSWORD}" | chpasswd  > /dev/null 2>&1
-		else
-			rc-service pwgen start
+		elif ! service_started pwgen
+			rc-service -i pwgen start
 		fi
 		if yesno "${SSHD}"
 		then
@@ -596,7 +604,10 @@ start() {
 
 			einfo "${sndmsg}"
 
-			rc-service -i alsasound start
+			if ! service_started alsasound
+			then
+				rc-service -i alsasound start
+			fi
 
 			if [ -e /proc/asound/cards ]
 			then



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     61e233ee548967b54db3c7611efcd8171a368a55
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 00:21:22 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=61e233ee

use rc-service to check for existance

---
 autoconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/autoconfig b/autoconfig
index a65968b..cdcb89c 100755
--- a/autoconfig
+++ b/autoconfig
@@ -458,7 +458,7 @@ start() {
 		# Check whether we should be using hotplug/coldplug or whether we should
 		# just let udev do it all.
 		# coldplug+hotplug would already be up due to list_services
-		if [ ! -x /etc/init.d/coldplug -a ! -x /etc/init.d/hotplug ]
+		if ! rc-service -e coldplug && ! rc-service -e hotplug
 		then
 			# TODO: This needs to go to a seperate script, so that hwsetup can depend on it.
 			unpack_firmware



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     7d544b9efa9b4c722ce30e2c476986ac60b3f706
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 04:20:51 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=7d544b9e

use "rc-service -i" to test for and start services

With openrc, we can use "rc-service -i foo start" to test for the existance of
service foo and start it if it does exist.

---
 autoconfig |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/autoconfig b/autoconfig
index cdcb89c..d8df734 100755
--- a/autoconfig
+++ b/autoconfig
@@ -474,7 +474,7 @@ start() {
 	then
 		modprobe apm power_off=1 >/dev/null 2>&1 && \
 			einfo "APM BIOS found, power management functions enabled ..."
-		[ -x /etc/init.d/apmd ] && /etc/init.d/apmd start
+		rc-service -i apmd start
 	else
 		einfo "Not Loading APM Bios support ..."
 	fi
@@ -491,7 +491,7 @@ start() {
 		modprobe thermal >/dev/null 2>&1
 		modprobe video >/dev/null 2>&1
 		modprobe dock >/dev/null 2>&1
-		[ -x /etc/init.d/acpid ] && /etc/init.d/acpid start
+		rc-service -i acpid start
 		eend
 	else
 		einfo "Not Loading ACPI support ..."
@@ -499,14 +499,14 @@ start() {
 
 	if yesno "${IDEDMA}"
 	then
-		[ -x /etc/init.d/hdparm ] && /etc/init.d/hdparm start
+		rc-service -i hdparm start
 	else
 		ewarn "Disabling IDE DMA support ..."
 	fi
 
 	if yesno "${PCMCIA}"
 	then
-		[ -x /etc/init.d/pcmcia ] && /etc/init.d/pcmcia start
+		rc-service -i pcmcia start
 	else
 		ewarn "PCMCIA disabled via cmdline ..."
 	fi
@@ -559,14 +559,14 @@ start() {
 		done
 		if yesno "${NFS}"
 		then
-			[ -x /etc/init.d/portmap ] && /etc/init.d/portmap start
-			[ -x /etc/init.d/nfsmount ] && /etc/init.d/nfsmount start
+			rc-service -i portmap start
+			rc-service -i nfsmount start
 		fi
 		if ! yesno "${PASSWD}"
 		then
 			echo "root:${PASSWORD}" | chpasswd  > /dev/null 2>&1
 		else
-			/etc/init.d/pwgen start
+			rc-service pwgen start
 		fi
 		if yesno "${SSHD}"
 		then
@@ -577,7 +577,7 @@ start() {
 				ewarn "WARNING: You are starting sshd with a scrambled root password!!!"
 				ewarn "WARNING: You need to set a root password to be able to login remotely."
 			fi
-			[ -x /etc/init.d/sshd ] && /etc/init.d/sshd start
+			rc-service -i sshd start
 		fi
 	else
 		ewarn "No Network device auto detected ..."
@@ -596,10 +596,7 @@ start() {
 
 			einfo "${sndmsg}"
 
-			if [ -x /etc/init.d/alsasound ]
-			then
-				/etc/init.d/alsasound start
-			fi
+			rc-service -i alsasound start
 
 			if [ -e /proc/asound/cards ]
 			then
@@ -640,7 +637,7 @@ start() {
 
 				if [ "${SPEAKUP_MODULE}" = "speakup_soft" ]
 				then
-					[ -x /etc/init.d/espeakup ] && /etc/init.d/espeakup start
+					rc-service -i espeakup start
 				fi
 			fi
 		fi



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     82b7e31ce4d7cd9d71d7e65c9287922af1cf4cd4
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 23:57:38 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=82b7e31c

migrate yes/no tests to use if yesno

---
 autoconfig |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/autoconfig b/autoconfig
index cfa8bf6..c05a3d1 100755
--- a/autoconfig
+++ b/autoconfig
@@ -226,7 +226,7 @@ check_svc() {
 list_services() {
 	get_config
 	# Must not print anything here
-	if [ "${DETECT}" = "yes" ]
+	if yesno "${DETECT}"
 	then
 		local arch="$(uname -m)"
 
@@ -402,14 +402,12 @@ start() {
 	echo "0" > /proc/sys/kernel/printk
 	get_config
 
-	# DONE: BRLTTY migrated to depend
-
-	if [ "${SPEAKUP}" = "yes" ]
+	if yesno "${SPEAKUP}"
 	then
 		modprobe ${SPEAKUP_MODULE} ${SPEAKUP_OPTIONS}
 	fi
 
-	if [ "${DETECT}" = "yes" ]
+	if yesno "${DETECT}"
 	then
 		ebegin "Hardware detection started"
 			local numcpu="$(grep -c '^processor[[:space:]]\+:' /proc/cpuinfo)"
@@ -455,7 +453,7 @@ start() {
 	fi
 
 	# Now, we check if we are supposed to run a coldplug script.
-	if [ "${COLDPLUG}" = "yes" ]
+	if yesno "${COLDPLUG}"
 	then
 		# Check whether we should be using hotplug/coldplug or whether we should
 		# just let udev do it all.
@@ -475,7 +473,7 @@ start() {
 		ewarn "Hotplug/Coldplug disabled via cmdline ..."
 	fi
 
-	if [ "${APM}" = "yes" ]
+	if yesno "${APM}"
 	then
 		modprobe apm power_off=1 >/dev/null 2>&1 && \
 			einfo "APM BIOS found, power management functions enabled ..."
@@ -484,7 +482,7 @@ start() {
 		einfo "Not Loading APM Bios support ..."
 	fi
 
-	if [ "${ACPI}" = "yes" ]
+	if yesno "${ACPI}"
 	then
 		modprobe processor >/dev/null 2>&1 && \
 			ebegin "ACPI power management functions enabled" && \
@@ -502,21 +500,21 @@ start() {
 		einfo "Not Loading ACPI support ..."
 	fi
 
-	if [ "${IDEDMA}" = "yes" ]
+	if yesno "${IDEDMA}"
 	then
 		[ -x /etc/init.d/hdparm ] && /etc/init.d/hdparm start
 	else
 		ewarn "Disabling IDE DMA support ..."
 	fi
 
-	if [ "${PCMCIA}" = "yes" ]
+	if yesno "${PCMCIA}"
 	then
 		[ -x /etc/init.d/pcmcia ] && /etc/init.d/pcmcia start
 	else
 		ewarn "PCMCIA disabled via cmdline ..."
 	fi
 
-	if [ "${DHCP}" = "no" ]
+	if ! yesno "${DHCP}"
 	then
 		sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \
 			-e '/^iface_eth.*dhcp.*/ s/^/#/' \
@@ -548,7 +546,7 @@ start() {
 	then
 		for nics in ${NETDEVICES}
 		do
-			if [ "${DHCP}" = "yes" ]
+			if yesno "${DHCP}"
 			then
 				einfo "Network device ${HILITE}${nics}${NORMAL} detected, DHCP broadcasting for IP ..."
 				if [ -f /var/run/dhcpcd-${nics}.pid ]
@@ -562,22 +560,22 @@ start() {
 				fi
 			fi
 		done
-		if [ "${NFS}" = "yes" ]
+		if yesno "${NFS}"
 		then
 			[ -x /etc/init.d/portmap ] && /etc/init.d/portmap start
 			[ -x /etc/init.d/nfsmount ] && /etc/init.d/nfsmount start
 		fi
-		if [ "${PASSWD}" = "no" ]
+		if ! yesno "${PASSWD}"
 		then
 			echo "root:${PASSWORD}" | chpasswd  > /dev/null 2>&1
 		else
 			/etc/init.d/pwgen start
 		fi
-		if [ "${SSHD}" = "yes" ]
+		if yesno "${SSHD}"
 		then
 			# If we have passwd= on the command line, we do not run pwgen and we
 			# set the root password to PASSWORD.
-			if [ "${PASSWD}" = "yes" ]
+			if yesno "${PASSWD}"
 			then
 				ewarn "WARNING: You are starting sshd with a scrambled root password!!!"
 				ewarn "WARNING: You need to set a root password to be able to login remotely."
@@ -588,7 +586,7 @@ start() {
 		ewarn "No Network device auto detected ..."
 	fi
 
-	if [ "${ALSA}" = "yes" ]
+	if yesno "${ALSA}"
 	then
 		if [ -n "${SOUND_FULLNAME}" -o -n "${SOUND_DRIVER}" ]
 		then
@@ -655,7 +653,7 @@ start() {
 
 	[ -n "${XDESC}" ] && einfo "VideoCard:   ${HILITE}${XDESC}${NORMAL}"
 
-	if [ "${X11}" = "no" ]
+	if ! yesno "${X11}"
 	then
 		touch /etc/.noxdm
 	fi



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     e06923f0f8cb5a96ce767f3dee0009a131471b6e
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 00:06:00 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=e06923f0

Coldplug and hotplug are in list_services.

---
 autoconfig |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/autoconfig b/autoconfig
index c05a3d1..a65968b 100755
--- a/autoconfig
+++ b/autoconfig
@@ -457,13 +457,10 @@ start() {
 	then
 		# Check whether we should be using hotplug/coldplug or whether we should
 		# just let udev do it all.
-		if [ -x /etc/init.d/coldplug ]
+		# coldplug+hotplug would already be up due to list_services
+		if [ ! -x /etc/init.d/coldplug -a ! -x /etc/init.d/hotplug ]
 		then
-			/etc/init.d/coldplug start
-		elif [ -x /etc/init.d/hotplug ]
-		then
-			/etc/init.d/hotplug start
-		else
+			# TODO: This needs to go to a seperate script, so that hwsetup can depend on it.
 			unpack_firmware
 			[ -x /sbin/udevtrigger ] && /sbin/udevtrigger
 		fi



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     353af9d347ee91ea799d5c22b6816df10122583c
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 21:09:37 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:42:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=353af9d3

Hook up list_services to depend need call.

---
 autoconfig |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/autoconfig b/autoconfig
index 4763bc2..f4a9a6d 100755
--- a/autoconfig
+++ b/autoconfig
@@ -203,7 +203,7 @@ get_config() {
 }
 
 depend() {
-	need modules
+	need modules $(list_services)
 	before net
 }
 
@@ -225,6 +225,37 @@ check_svc() {
 # Prints an ordered list of services that will be started by autoconfig.
 list_services() {
 	get_config
+	# Must not print anything here
+	if [ "${DETECT}" = "yes" ]
+	then
+		local arch="$(uname -m)"
+
+		case ${arch} in
+			mips*)
+				ACPI="no"
+				APM="no"
+				IDEDMA="no"
+			;;
+			i?86|x86_64)
+				:
+			;;
+			alpha)
+				ACPI="no"
+				APM="no"
+			;;
+			sparc*)
+				ACPI="no"
+				APM="no"
+			;;
+			powerpc*)
+				ACPI="no"
+				APM="no"
+			;;
+			ia64)
+				APM="no"
+			;;
+		esac
+	fi
 
 	local svcs="$(check_svc ${ACPI} acpid)"
 	svcs="${svcs} $(check_svc ${ALSA} alsasound)"



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     66f19c49e11110cbe6c8d13aebd7b66cf3b85dcc
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 23:21:48 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:42:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=66f19c49

check_svc should use yesno and rc-service

---
 autoconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/autoconfig b/autoconfig
index e9eba0f..cfa8bf6 100755
--- a/autoconfig
+++ b/autoconfig
@@ -210,12 +210,12 @@ depend() {
 # Checks whether a service will be started by autoconfig.
 # Usage: check_svc var service [service_alternative]
 check_svc() {
-	if [ "${1}" = "yes" ]
+	if yesno "${1}"
 	then
-		if [ -x "/etc/init.d/${2}" ]
+		if rc-service -e "${2}"
 		then
 			echo "${2}"
-		elif [ -n "${3}" -a -x "/etc/init.d/${3}" ]
+		elif [ -n "${3}" ] && rc-service -e ${3}"
 		then
 			echo "${3}"
 		fi	



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-05-01  2:49 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-05-01  2:49 UTC (permalink / raw
  To: gentoo-commits

commit:     464882579e578c9368779f57c4965fcad143ad7c
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 21:10:58 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:42:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=46488257

Migrate BRLTTY to depend block, another good example for simple calls.

---
 autoconfig |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/autoconfig b/autoconfig
index f4a9a6d..e9eba0f 100755
--- a/autoconfig
+++ b/autoconfig
@@ -260,6 +260,7 @@ list_services() {
 	local svcs="$(check_svc ${ACPI} acpid)"
 	svcs="${svcs} $(check_svc ${ALSA} alsasound)"
 	svcs="${svcs} $(check_svc ${APM} apmd)"
+	svcs="${svcs} $(check_svc ${BRLTTY} brltty)"
 	svcs="${svcs} $(check_svc ${COLDPLUG} coldplug hotplug)"
 	svcs="${svcs} $(check_svc ${GPM} gpm)"
 	svcs="${svcs} $(check_svc ${HALD} hald)"
@@ -401,10 +402,7 @@ start() {
 	echo "0" > /proc/sys/kernel/printk
 	get_config
 
-	if [ "${BRLTTY}" = "yes" ]
-	then
-		[ -x /etc/init.d/brltty ] && /etc/init.d/brltty start
-	fi
+	# DONE: BRLTTY migrated to depend
 
 	if [ "${SPEAKUP}" = "yes" ]
 	then



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-02-17  5:38 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-02-17  5:38 UTC (permalink / raw
  To: gentoo-commits

commit:     febcaf663822895a2e20006f2dbb1e67d3c2077b
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 17 05:33:50 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 17 05:33:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=febcaf66

add --visit-items to dialog commands

this makes the net-setup script much more accessible with speakup.

X-Gentoo-Bug: 302381
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=302381

---
 livecd-functions.sh |   28 ++++++++++++++--------------
 net-setup           |    2 +-
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/livecd-functions.sh b/livecd-functions.sh
index d51dd9e..5eac162 100755
--- a/livecd-functions.sh
+++ b/livecd-functions.sh
@@ -146,19 +146,19 @@ livecd_config_wireless() {
 	cd /tmp/setup.opts
 	[ -x /usr/sbin/iwconfig ] && iwconfig=/usr/sbin/iwconfig
 	[ -x /sbin/iwconfig ] && iwconfig=/sbin/iwconfig
-	dialog --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID
+	dialog --visit-items --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID
 	SSID=$(tail -n 1 ${iface}.SSID)
 	if [ -n "${SSID}" ]
 	then
-		dialog --title "WEP (Part 1)" --menu "Does your network use encryption?" 20 60 7 1 "Yes" 2 "No" 2> ${iface}.WEP
+		dialog --visit-items --title "WEP (Part 1)" --menu "Does your network use encryption?" 20 60 7 1 "Yes" 2 "No" 2> ${iface}.WEP
 		WEP=$(tail -n 1 ${iface}.WEP)
 		case ${WEP} in
 			1)
-				dialog --title "WEP (Part 2)" --menu "Are you entering your WEP key in HEX or ASCII?" 20 60 7 1 "HEX" 2 "ASCII" 2> ${iface}.WEPTYPE
+				dialog --visit-items --title "WEP (Part 2)" --menu "Are you entering your WEP key in HEX or ASCII?" 20 60 7 1 "HEX" 2 "ASCII" 2> ${iface}.WEPTYPE
 				WEP_TYPE=$(tail -n 1 ${iface}.WEPTYPE)
 				case ${WEP_TYPE} in
 					1)
-						dialog --title "WEP (Part 3)" --inputbox "Please enter your WEP key in the form of XXXX-XXXX-XX for 64-bit or XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX for 128-bit" 20 50 2> ${iface}.WEPKEY
+						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in the form of XXXX-XXXX-XX for 64-bit or XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX for 128-bit" 20 50 2> ${iface}.WEPKEY
 						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
 						if [ -n "${WEP_KEY}" ]
 						then
@@ -167,7 +167,7 @@ livecd_config_wireless() {
 						fi
 					;;
 					2)
-						dialog --title "WEP (Part 3)" --inputbox "Please enter your WEP key in ASCII form.  This should be 5 or 13 characters for either 64-bit or 128-bit encryption, repectively" 20 50 2> ${iface}.WEPKEY
+						dialog --visit-items --title "WEP (Part 3)" --inputbox "Please enter your WEP key in ASCII form.  This should be 5 or 13 characters for either 64-bit or 128-bit encryption, repectively" 20 50 2> ${iface}.WEPKEY
 						WEP_KEY=$(tail -n 1 ${iface}.WEPKEY)
 						if [ -n "${WEP_KEY}" ]
 						then
@@ -224,23 +224,23 @@ livecd_write_wireless_conf() {
 
 livecd_config_ip() {
 	cd /tmp/setup.opts
-	dialog --title "TCP/IP setup" --menu "You can use DHCP to automatically configure a network interface or you can specify an IP and related settings manually. Choose one option:" 20 60 7 1 "Use DHCP to auto-detect my network settings" 2 "Specify an IP address manually" 2> ${iface}.DHCP
+	dialog --visit-items --title "TCP/IP setup" --menu "You can use DHCP to automatically configure a network interface or you can specify an IP and related settings manually. Choose one option:" 20 60 7 1 "Use DHCP to auto-detect my network settings" 2 "Specify an IP address manually" 2> ${iface}.DHCP
 	DHCP=$(tail -n 1 ${iface}.DHCP)
 	case ${DHCP} in
 		1)
 			/sbin/dhcpcd -n -t 10 -h $(hostname) ${iface} &
 		;;
 		2)
-			dialog --title "IP address" --inputbox "Please enter an IP address for ${iface}:" 20 50 "192.168.1.1" 2> ${iface}.IP
+			dialog --visit-items --title "IP address" --inputbox "Please enter an IP address for ${iface}:" 20 50 "192.168.1.1" 2> ${iface}.IP
 			IP=$(tail -n 1 ${iface}.IP)
 			BC_TEMP=$(echo $IP|cut -d . -f 1).$(echo $IP|cut -d . -f 2).$(echo $IP|cut -d . -f 3).255
-			dialog --title "Broadcast address" --inputbox "Please enter a Broadcast address for ${iface}:" 20 50 "${BC_TEMP}" 2> ${iface}.BC
+			dialog --visit-items --title "Broadcast address" --inputbox "Please enter a Broadcast address for ${iface}:" 20 50 "${BC_TEMP}" 2> ${iface}.BC
 			BROADCAST=$(tail -n 1 ${iface}.BC)
-			dialog --title "Network mask" --inputbox "Please enter a Network Mask for ${iface}:" 20 50 "255.255.255.0" 2> ${iface}.NM
+			dialog --visit-items --title "Network mask" --inputbox "Please enter a Network Mask for ${iface}:" 20 50 "255.255.255.0" 2> ${iface}.NM
 			NETMASK=$(tail -n 1 ${iface}.NM)
-			dialog --title "Gateway" --inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" 20 50 2> ${iface}.GW
+			dialog --visit-items --title "Gateway" --inputbox "Please enter a Gateway for ${iface} (hit enter for none:)" 20 50 2> ${iface}.GW
 			GATEWAY=$(tail -n 1 ${iface}.GW)
-			dialog --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS
+			dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS
 			DNS=$(tail -n 1 ${iface}.DNS)
 			/sbin/ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
 			if [ -n "${GATEWAY}" ]
@@ -249,7 +249,7 @@ livecd_config_ip() {
 			fi
 			if [ -n "${DNS}" ]
 			then
-				dialog --title "DNS Search Suffix" --inputbox "Please enter any domains which you would like to search on DNS queries (hit enter for none:)" 20 50 2> ${iface}.SUFFIX
+				dialog --visit-items --title "DNS Search Suffix" --inputbox "Please enter any domains which you would like to search on DNS queries (hit enter for none:)" 20 50 2> ${iface}.SUFFIX
 				SUFFIX=$(tail -n 1 ${iface}.SUFFIX)
 				echo "nameserver ${DNS}" > /etc/resolv.conf
 				if [ -n "${SUFFIX}" ]
@@ -393,7 +393,7 @@ show_ifmenu() {
 	done
 	IFS="${old_ifs}"
 
-	if ! eval dialog --menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
+	if ! eval dialog --visit-items --menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface
 	then
 		exit
 	fi
@@ -415,7 +415,7 @@ show_ifconfirm() {
 	[[ -n ${if_bus} ]] && text="${text}Bus type: ${if_bus}\n"
 	text="${text}\nIs this the interface that you wish to configure?"
 
-	if ! dialog --title "Interface details" --yesno "${text}" 15 70
+	if ! dialog --visit-items --title "Interface details" --yesno "${text}" 15 70
 	then
 		result="no"
 	else

diff --git a/net-setup b/net-setup
index f20d4c7..e81db2e 100755
--- a/net-setup
+++ b/net-setup
@@ -39,7 +39,7 @@ done
 # Show stderr again
 exec 2>/dev/stderr
 
-dialog --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings.  All questions below apply to the ${iface} interface only.  Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
+dialog --visit-items --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings.  All questions below apply to the ${iface} interface only.  Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
 WIRED_WIRELESS=$(tail -n 1 ${iface}.WIRED_WIRELESS)
 case ${WIRED_WIRELESS} in
 	1)



^ permalink raw reply related	[flat|nested] 45+ messages in thread
* [gentoo-commits] proj/livecd-tools:master commit in: /
@ 2011-02-10 21:30 William Hubbs
  0 siblings, 0 replies; 45+ messages in thread
From: William Hubbs @ 2011-02-10 21:30 UTC (permalink / raw
  To: gentoo-commits

commit:     881eb4c2f85c0d955d2d750e7a59caa014212f8d
Author:     David Abbott <dabbott <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 21:28:35 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 10 21:28:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=881eb4c2

fix typo

X-Gentoo-Bug: 352377
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=352377

---
 autoconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/autoconfig b/autoconfig
index df96d59..282fd60 100755
--- a/autoconfig
+++ b/autoconfig
@@ -645,6 +645,7 @@ start() {
 	[ -n "${XDESC}" ] && einfo "VideoCard:   ${HILITE}${XDESC}${NORMAL}"
 
 	if [ "${X11}" = "no" ]
+	then
 		touch /etc/.noxdm
 	fi
 



^ permalink raw reply related	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2019-09-26 17:07 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 19:56 [gentoo-commits] proj/livecd-tools:master commit in: / William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2019-09-26 17:07 Rick Farina
2017-03-07 15:35 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 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox