summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr00t <bts@square-r00t.net>2018-01-04 17:57:15 -0500
committerr00t <bts@square-r00t.net>2018-01-04 17:57:15 -0500
commite72eee4deca0b886c0a97c5c5ceecc192b7f1209 (patch)
treec66d73065f5721980693c6f35dba712842d4a9f2
parent2b233b9af9b5a4054685604fa6a5a4322fe477d7 (diff)
downloadBDisk-e72eee4deca0b886c0a97c5c5ceecc192b7f1209.tar.xz
net-tools => iproute2 fixes
-rwxr-xr-xextra/pre-build.d/etc/systemd/scripts/livecd.fix.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/extra/pre-build.d/etc/systemd/scripts/livecd.fix.sh b/extra/pre-build.d/etc/systemd/scripts/livecd.fix.sh
index ea73419..b3871cc 100755
--- a/extra/pre-build.d/etc/systemd/scripts/livecd.fix.sh
+++ b/extra/pre-build.d/etc/systemd/scripts/livecd.fix.sh
@@ -22,7 +22,7 @@ do
done
function fuck_you_gimme_net() {
-IFACE=$(ifconfig -a -s | egrep -E '^((en|wl)p?|em)' | awk '{print $1}' | tr '\n' ' ' | sed -e 's/\ $//g')
+IFACE=$(ip -o link | awk '{print $2}' | egrep -E '^((en|wl)p?|em)' | sed -e 's/:$//g' | head -n1)
for i in ${IFACE};
do
@@ -41,15 +41,15 @@ do
DEV='wireless-open'
fi
- ifconfig ${i} down
+ ip link set dev ${i} down
cp -a /etc/netctl/examples/${DEV} /etc/netctl/${i}
sed -i -re "s/^([[:space:]]*Interface[[:space:]]*=).*/\1${i}/g" /etc/netctl/${i}
if [ "${DEV}" == "wireless-open" ];
then
- ifconfig ${i} up && \
+ ip link set dev ${i} up && \
ESSID=$(iwlist ${i} scanning | egrep -A5 -B5 '^[[:space:]]*Encryption key:off' | egrep '^[[:space:]]*ESSID:' | sed -re 's/^[[:space:]]*ESSID:(.*)/\1/g')
sed -i -re "s/^([[:space:]]*ESSID[[:space:]]*=).*/\1${ESSID}/g" /etc/netctl/${i}
- ifconfig ${i} down
+ ip link set ${i} down
fi
netctl restart ${i} > /dev/null 2>&1
#cat /etc/resolvconf.conf.failover > /etc/resolvconf.conf