maverick: remove old code

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-09-20 08:41:04 +02:00
parent 39ca4eedaa
commit e61b923048
6 changed files with 0 additions and 142 deletions

View File

@@ -1,25 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=maverick
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/maverick
SECTION:=ucentral
CATEGORY:=uCentral
TITLE:=TIP maverick
DEPENDS:=+libubox
endef
define Package/maverick/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/maverick $(1)/usr/sbin/
$(CP) ./files/* $(1)
endef
$(eval $(call BuildPackage,maverick))

View File

@@ -1,14 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
PROG=/usr/sbin/maverick
start_service() {
active=$(readlink /etc/ucentral/ucentral.active)
[ -n "$active" -a "$active" != "/etc/ucentral/ucentral.cfg.0000000001" ] && return 0
procd_open_instance
procd_set_param command "$PROG"
procd_close_instance
}

View File

@@ -1,53 +0,0 @@
#!/bin/sh
active=$(ubus call ucentral status | jsonfilter -e '@.active')
[ -n "$active" -a ! "$active" -eq 1 ] && {
logger maverick: all good
exit 0
}
logger maverick: entering failsafe
rm /etc/config/network /etc/config/wireless
cp /rom/etc/config/uhttpd /rom/etc/config/firewall /rom/etc/config/dhcp /rom/etc/config/dropbear /etc/config
config_generate
wifi config
. /lib/functions.sh
SUFFIX=$(uci get system.@system[0].hostname | tail -c 7 | tr a-f A-F | tr -d '\n')
radio_enable() {
uci set wireless.$1.disabled=0
}
ssid_set() {
uci set wireless.$1.ssid=Maverick-${SUFFIX}
}
delete_forwarding() {
uci delete firewall.$1
}
config_load wireless
config_foreach radio_enable wifi-device
config_foreach ssid_set wifi-iface
config_load firewall
config_foreach delete_forwarding forwarding
[ -z "$(uci get network.lan)" ] && {
# single port devices wont bring up a lan interface by default
uci set network.lan=interface
uci set network.lan.type=bridge
uci set network.lan.proto=static
uci set network.lan.ipaddr=192.168.1.1
uci set network.lan.netmask=255.255.255.0
}
uci commit
/etc/init.d/rpcd start
/etc/init.d/uhttpd start
reload_config

View File

@@ -1,13 +0,0 @@
cmake_minimum_required(VERSION 2.6)
PROJECT(maverick C)
INCLUDE(GNUInstallDirs)
ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
ADD_EXECUTABLE(maverick maverick.c)
TARGET_LINK_LIBRARIES(maverick ubox)
INSTALL(TARGETS maverick
RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)

View File

@@ -1,36 +0,0 @@
/* SPDX-License-Identifier: BSD-3-Clause */
#include <linux/limits.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <libubox/uloop.h>
#include <libubox/ulog.h>
static void
maverick_cb(struct uloop_timeout *delay)
{
ULOG_INFO("triggering maverick check");
if (system("/usr/libexec/ucentral/maverick.sh"))
ULOG_ERR("failed to launch Maverick");
uloop_end();
return;
}
static struct uloop_timeout maverick = {
.cb = maverick_cb,
};
int
main(int argc, char **argv)
{
ulog_open(ULOG_STDIO | ULOG_SYSLOG, LOG_DAEMON, "maverick");
uloop_init();
uloop_timeout_set(&maverick, 300 * 1000);
uloop_run();
uloop_done();
return 0;
}

View File

@@ -29,7 +29,6 @@ packages:
- kmod-sched-bpf
- kmod-usb-acm
- lldpd
- maverick
- uspot
- spotfilter
- radius-gw-proxy