diff --git a/ifsi/Makefile b/ifsi/Makefile deleted file mode 100644 index 78d552f42..000000000 --- a/ifsi/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2018 iopsys Software Solutions AB -# -# This is free software, licensed under the GNU General Public License v2. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=ifsi -PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPLv2 - -include $(INCLUDE_DIR)/package.mk - -LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ - -Wl,-rpath-link=$(STAGING_DIR)/lib - -define Package/ifsi - CATEGORY:=Utilities - DEPENDS:=+ubus +libubox - TITLE:=Inteno Functional Script Interface -endef - -define Package/ifsi/description - Inteno Functional Script Interface -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - -define Package/ifsi/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifsi $(1)/sbin/ -endef - -$(eval $(call BuildPackage,ifsi)) diff --git a/ifsi/src/Makefile b/ifsi/src/Makefile deleted file mode 100644 index 04a7d3a98..000000000 --- a/ifsi/src/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -CC = gcc -CFLAGS = -g -Wall -LOCLIBS = -LIBS = -lubus -lubox -lblobmsg_json -OBJS = ifsi.o -SRCS = ifsi.c -LIBSRCS = -ISRCS = - -all: ifsi - -ifsi: ${OBJS} - ${CC} ${LDFLAGS} ${LIBSRCS} -o ifsi ${OBJS} ${LIBS} - -clean: - rm -f ifsi *.o - diff --git a/ifsi/src/ifsi.c b/ifsi/src/ifsi.c deleted file mode 100644 index 985b56a9d..000000000 --- a/ifsi/src/ifsi.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * ifsi -- Inteno functional script interface - * - * Copyright (C) 2012-2013 Inteno Broadband Technology AB. All rights reserved. - * - * Author: dev@inteno.se - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#include - -#include -#include -#include - -#include - -static struct ubus_context *ctx; -static struct ubus_event_handler event_listener; -static struct blob_buf b; - - -static void receive_event(struct ubus_context *ctx, struct ubus_event_handler *ev, - const char *type, struct blob_attr *msg) -{ - char *str; - uint32_t id; - - str = blobmsg_format_json(msg, true); - fprintf(stdout, "I got %s event %s\n", type, str); - free(str); -} - -int main(int argc, char **argv) -{ - const char *ubus_socket = NULL; - int ret; - - uloop_init(); - - ctx = ubus_connect(ubus_socket); - if (!ctx) { - fprintf(stderr, "Failed to connect to ubus\n"); - return 1; - } - - ubus_add_uloop(ctx); - - event_listener.cb = receive_event; - ret = ubus_register_event_handler(ctx, &event_listener, "*"); - if (ret) - fprintf(stderr, "Couldn't register to router events\n"); - - uloop_run(); - - ubus_free(ctx); - uloop_done(); - - return 0; -} -