ifup-wireless: remove unneeded pipes
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
93397b69a2
commit
333285d76d
@ -38,18 +38,16 @@ if [ "$WIRELESS_ESSID" ]; then
|
|||||||
ifconfig ${DEVICE} up
|
ifconfig ${DEVICE} up
|
||||||
iwlist ${DEVICE} scan essid $WIRELESS_ESSID > $tmpfile; }
|
iwlist ${DEVICE} scan essid $WIRELESS_ESSID > $tmpfile; }
|
||||||
|
|
||||||
cat $tmpfile | \
|
|
||||||
while read line; do
|
while read line; do
|
||||||
if [ "${line:0:5}" = "Cell " ]; then
|
if [ "${line:0:5}" = "Cell " ]; then
|
||||||
[ "$found_essid" ] && break || > $tmpfile1
|
[ "$found_essid" ] && break || > $tmpfile1
|
||||||
fi
|
fi
|
||||||
echo $line >> $tmpfile1
|
echo $line >> $tmpfile1
|
||||||
[ "$line" = "ESSID:\"$WIRELESS_ESSID\"" ] && found_essid=1
|
[ "$line" = "ESSID:\"$WIRELESS_ESSID\"" ] && found_essid=1
|
||||||
done
|
done < $tmpfile
|
||||||
|
|
||||||
> $tmpfile
|
> $tmpfile
|
||||||
|
|
||||||
cat $tmpfile1 | \
|
|
||||||
while read line; do
|
while read line; do
|
||||||
vname=${line/:*}
|
vname=${line/:*}
|
||||||
if [ "${line:0:4}" = "Cell" ]; then
|
if [ "${line:0:4}" = "Cell" ]; then
|
||||||
@ -79,7 +77,7 @@ if [ "$WIRELESS_ESSID" ]; then
|
|||||||
"$vname" = "WIRELESS_AUTO_Authentication_Suites" ]; then
|
"$vname" = "WIRELESS_AUTO_Authentication_Suites" ]; then
|
||||||
echo $vname=$vval >> $tmpfile
|
echo $vname=$vval >> $tmpfile
|
||||||
fi
|
fi
|
||||||
done
|
done < $tmpfile1
|
||||||
|
|
||||||
. $tmpfile
|
. $tmpfile
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user