diff --git a/src/packages/ffol/ath9k-watchdog/Makefile b/src/packages/ffol/ath9k-watchdog/Makefile deleted file mode 100755 index 985b253..0000000 --- a/src/packages/ffol/ath9k-watchdog/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ath9k-watchdog -PKG_VERSION:=1 -PKG_RELEASE:=1 - - -include $(INCLUDE_DIR)/package.mk - - -define Package/ath9k-watchdog - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Watchdog for ath9k-outages -endef - -define Package/ath9k-watchdog/description - If pattern "ResetWLAN" is seen in the logs, wifi reset is executed -endef - - -define Package/ath9k-watchdog/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) files/ath9k-watchdog $(1)/usr/sbin/ - $(INSTALL_BIN) files/ath9k-watchdog-pm $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/ath9k-watchdog.init $(1)/etc/init.d/ath9k-watchdog -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef -$(eval $(call BuildPackage,ath9k-watchdog)) diff --git a/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog b/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog deleted file mode 100755 index b3c5a4d..0000000 --- a/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -mkdir -p /usr/lib/ath9k-watchdog - -logread -f | while read line -do - case "$line" in - *"Could not stop RX"*) - hostname=$(cat /proc/sys/kernel/hostname) - - if [ "$hostname" == "OpenWrt" ]; then - hostname="" - fi - - if [ "$hostname" == "" ]; then - hostname=$(awk '{ if (mac) next; mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address /sys/class/net/eth0/address /sys/class/net/ath0/address 2>/dev/null) - fi - - # Perform post-mortem dump - tstmp=$(/bin/date +%s) - echo -n "data[hostname]=${hostname}&data[tstmp]=${tstmp}" > /tmp/$tstmp - - # Move into upload directory - mv /tmp/$tstmp /usr/lib/ath9k-watchdog - - #Bye - /sbin/reboot - ;; - *) - ;; - esac -done diff --git a/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog-pm b/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog-pm deleted file mode 100755 index 93dff26..0000000 --- a/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog-pm +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Save log -mkdir -p /usr/lib/ath9k-watchdog -WGETC=$(which wget) - - -# CD to avoid annoying prefixes -cd /usr/lib/ath9k-watchdog - -#Poll directory every 60 secs -while [ 1 = 1 ] -do - if [ "$(ls .)" != "" ] - then - UPLOAD_URL="http://[$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)]/api/rest/event/" - for f in $(ls .); do - $WGETC -q $UPLOAD_URL"?api_key=$(uci get configurator.@api[0].api_key)&object=router&object_id="$(uci get configurator.@crawl[0].router_id)"&action=watchdog_ath9k_bug&"$(cat $f) -O - && rm $f - done - # If there are more than 15 files, assume that files cannot be uploaded - # Delete oldest files in order to avoid jffs-overflow - ls -t | sed -e '1,15d' | xargs rm 2> /dev/null - fi - - sleep 60 -done diff --git a/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog.init b/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog.init deleted file mode 100755 index 4d38386..0000000 --- a/src/packages/ffol/ath9k-watchdog/files/ath9k-watchdog.init +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=95 -APP=ath9k-watchdog -POSTM=ath9k-watchdog-pm -PID_FILE=/var/run/$APP.pid -POSTM_PID_FILE=/var/run/$POSTM.pid - -start() { - if [ -f $PID_FILE ]; then - echo "Ath9k-watchdog: Already Running" - else - start-stop-daemon -S -x $APP -p $PID_FILE -m -b - fi - - if [ -f $POSTM_PID_FILE ]; then - echo "ath9k-watchdog-pm: Already Running" - else - start-stop-daemon -S -x $POSTM -p $POSTM_PID_FILE -m -b - fi -} - -stop() { - start-stop-daemon -K -n $APP -p $PID_FILE -s TERM - start-stop-daemon -K -n $POSTM -p $POSTM_PID_FILE -s TERM - rm -rf $PID_FILE - rm -rf $POSTM_PID_FILE -} \ No newline at end of file