summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtl8189ES_linux_v4.3.0_10600.20140220/wlan0dhcp
blob: 60433829cfe662dbe2d3451095838b2c2adb6efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

var0=`ps aux|awk '/dhclient wlan0/'|awk '$11!="awk"{print $2}'`

kill $var0
cp ifcfg-wlan0 /etc/sysconfig/network-scripts/

dhclient wlan0

var1=`ifconfig wlan0 |awk '/inet/{print $2}'|awk -F: '{print $2}'`


rm -f /etc/sysconfig/network-scripts/ifcfg-wlan0

echo "get ip: $var1"