mirror of
https://github.com/RinCat/RTL88x2BU-Linux-Driver.git
synced 2024-12-27 02:21:35 +00:00
17 lines
294 B
Plaintext
17 lines
294 B
Plaintext
|
#!/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"
|
||
|
|