1 |
commit: 8a840ff9f28127d1fd6adb34ab7f9e4b95d7ae50 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 25 18:14:13 2013 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 25 18:14:13 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=8a840ff9 |
7 |
|
8 |
livecd-functions.sh: do not hard code the paths to lspci or iwconfig |
9 |
|
10 |
Reported-by: jer <AT> gentoo.org |
11 |
X-Gentoo-Bug: 454728 |
12 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454728 |
13 |
|
14 |
--- |
15 |
livecd-functions.sh | 17 +++++++---------- |
16 |
1 files changed, 7 insertions(+), 10 deletions(-) |
17 |
|
18 |
diff --git a/livecd-functions.sh b/livecd-functions.sh |
19 |
index c9febd9..cff4d08 100755 |
20 |
--- a/livecd-functions.sh |
21 |
+++ b/livecd-functions.sh |
22 |
@@ -80,8 +80,7 @@ nv_no_gl() { |
23 |
} |
24 |
|
25 |
get_video_cards() { |
26 |
- [ -x /sbin/lspci ] && VIDEO_CARDS=$(/sbin/lspci | grep ' VGA ') |
27 |
- [ -x /usr/sbin/lspci ] && VIDEO_CARDS=$(/usr/sbin/lspci | grep ' VGA ') |
28 |
+ VIDEO_CARDS=$(lspci | grep ' VGA ') |
29 |
NUM_CARDS=$(echo ${VIDEO_CARDS} | wc -l) |
30 |
if [ ${NUM_CARDS} -eq 1 ] |
31 |
then |
32 |
@@ -144,8 +143,6 @@ get_video_cards() { |
33 |
|
34 |
livecd_config_wireless() { |
35 |
cd /tmp/setup.opts |
36 |
- [ -x /usr/sbin/iwconfig ] && iwconfig=/usr/sbin/iwconfig |
37 |
- [ -x /sbin/iwconfig ] && iwconfig=/sbin/iwconfig |
38 |
dialog --visit-items --title "SSID" --inputbox "Please enter your SSID, or leave blank for selecting the nearest open network" 20 50 2> ${iface}.SSID |
39 |
SSID=$(tail -n 1 ${iface}.SSID) |
40 |
if [ -n "${SSID}" ] |
41 |
@@ -162,8 +159,8 @@ livecd_config_wireless() { |
42 |
WEP_KEY=$(tail -n 1 ${iface}.WEPKEY) |
43 |
if [ -n "${WEP_KEY}" ] |
44 |
then |
45 |
- ${iwconfig} ${iface} essid "${SSID}" |
46 |
- ${iwconfig} ${iface} key "${WEP_KEY}" |
47 |
+ iwconfig ${iface} essid "${SSID}" |
48 |
+ iwconfig ${iface} key "${WEP_KEY}" |
49 |
fi |
50 |
;; |
51 |
2) |
52 |
@@ -171,15 +168,15 @@ livecd_config_wireless() { |
53 |
WEP_KEY=$(tail -n 1 ${iface}.WEPKEY) |
54 |
if [ -n "${WEP_KEY}" ] |
55 |
then |
56 |
- ${iwconfig} ${iface} essid "${SSID}" |
57 |
- ${iwconfig} ${iface} key "s:${WEP_KEY}" |
58 |
+ iwconfig ${iface} essid "${SSID}" |
59 |
+ iwconfig ${iface} key "s:${WEP_KEY}" |
60 |
fi |
61 |
;; |
62 |
esac |
63 |
;; |
64 |
2) |
65 |
- ${iwconfig} ${iface} essid "${SSID}" |
66 |
- ${iwconfig} ${iface} key off |
67 |
+ iwconfig ${iface} essid "${SSID}" |
68 |
+ iwconfig ${iface} key off |
69 |
;; |
70 |
esac |
71 |
fi |