From cb4c8a573983e570ba07cea399f692d1599615e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gon=C3=A7alves?= Date: Wed, 12 Apr 2017 21:20:17 +0100 Subject: [PATCH] iw: remove file check_wlan (move to filesystem). --- rules/iw/default.bash | 1 - rules/iw/fs/opt/check_wlan | 46 -------------------------------------- 2 files changed, 47 deletions(-) delete mode 100644 rules/iw/fs/opt/check_wlan diff --git a/rules/iw/default.bash b/rules/iw/default.bash index 87ac083..b86702b 100644 --- a/rules/iw/default.bash +++ b/rules/iw/default.bash @@ -30,5 +30,4 @@ target_install() $cmd_cp -r "etc/"* "$cfg_dir_rootfs/etc/" $cmd_cp -r "sbin/"* "$cfg_dir_rootfs/sbin/" $cmd_cp -r "lib/"* "$cfg_dir_rootfs/lib/" - $cmd_cp -r "$pkg_dir/fs/"* "$cfg_dir_rootfs/" } diff --git a/rules/iw/fs/opt/check_wlan b/rules/iw/fs/opt/check_wlan deleted file mode 100644 index f78a669..0000000 --- a/rules/iw/fs/opt/check_wlan +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/bin - -############################# USER INPUT ########################### - -ip_dest=10.0.30.3 - -#################################################################### - - -############### DON'T EDIT ########################################## - -check_interval=1 -log=/opt/.wifi.log -wlan=wlan0 -eth=eth0 - -exec 1> /dev/null -exec 2>> $log -echo $(date) > $log -# without check_interval set, we risk a 0 sleep = busy loop -if [ ! "$check_interval" ]; then - echo "No check interval set!" >> $log - exit 1 -fi - -startWifi () { - iw wlan0 connect LSTS >> $log -} - -ifconfig $eth down -ifconfig $wlan up - -while [ 1 ]; do - ping -q -c1 $ip_dest > /dev/null - if [ $? -ne 0 ]; then - echo $(date)" attempting restart..." >> $log - startWifi - sleep 1 - else - echo "IS LINKED" >> $log - sleep $check_interval - fi -done - -#####################################################################