From 8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 25 Feb 2013 12:14:13 -0600 Subject: livecd-functions.sh: do not hard code the paths to lspci or iwconfig Reported-by: jer@gentoo.org X-Gentoo-Bug: 454728 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454728 --- livecd-functions.sh | 17 +++++++---------- 1 file 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 -- cgit v1.2.3-65-gdbad