packages/ffol: remove unused old ath9k-watchdog

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Tim Niemeyer 2014-11-10 20:30:32 +01:00
parent f87f882794
commit 39f7565b92
4 changed files with 0 additions and 131 deletions

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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
}