summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2013-02-25 12:14:13 -0600
committerWilliam Hubbs <williamh@gentoo.org>2013-02-25 12:14:13 -0600
commit8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50 (patch)
tree0da7a90531242a7d3813d4dab1172a8e38430fbb
parentlivecd-functions.sh: do not hard code the path to route (diff)
downloadlivecd-tools-8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50.tar.gz
livecd-tools-8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50.tar.bz2
livecd-tools-8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50.zip
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
-rwxr-xr-xlivecd-functions.sh17
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