mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Add mac-telnet - a layer 2 Telnet/SSH server useful to access bricked devices
This package adds the mac-telnet server, client, ping and discovery utilities. See https://github.com/aouyar/MAC-Telnet for details. This package uses the fork from https://github.com/jow-/MAC-Telnet as source, the code there has a number of bugfixes and results in smaller binaries since most core functionality has been ported to libubox facilities provided by OpenWrt. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mac-telnet
|
||||
PKG_VERSION:=2014-09-03
|
||||
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/jow-/MAC-Telnet.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=9a8bf5c242c6b0336c2f257aa67d2240454ba4b0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections $(if $(CONFIG_MACTELNET_PLAIN_SUPPORT),-DTELNET_SUPPORT)
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
# 1: name
|
||||
# 2: executable
|
||||
define BuildPlugin
|
||||
define Package/mac-telnet-$(1)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libubox
|
||||
TITLE:=MAC-Telnet / MAC-SSH $(1)
|
||||
URL:=https://github.com/jow-/MAC-Telnet
|
||||
endef
|
||||
|
||||
define Package/mac-telnet-$(1)/description
|
||||
Open source MAC Telnet client and server utilities for connecting to
|
||||
Mikrotik RouterOS routers and Linux machines via MAC address.
|
||||
endef
|
||||
|
||||
define Package/mac-telnet-$(1)/install
|
||||
$(INSTALL_DIR) $$(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2) $$(1)/usr/sbin/
|
||||
$(call Package/mac-telnet-$(1)/install-extra)
|
||||
endef
|
||||
|
||||
$$(eval $$(call BuildPackage,mac-telnet-$(1)))
|
||||
endef
|
||||
|
||||
define Package/mac-telnet-server/config
|
||||
config MACTELNET_PLAIN_SUPPORT
|
||||
bool "Include support for plain telnet connections"
|
||||
depends on PACKAGE_mac-telnet-server
|
||||
default y
|
||||
help
|
||||
Disable this option to only support SSH logins to the
|
||||
MAC-Telnet server.
|
||||
endef
|
||||
|
||||
define Package/mac-telnet-server/install-extra
|
||||
$(INSTALL_DIR) $$(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/mactelnet.init $$(1)/etc/init.d/mactelnet
|
||||
$(INSTALL_DIR) $$(1)/etc/config
|
||||
$(INSTALL_DATE) ./files/mactelnet.config $$(1)/etc/config/mactelnet
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPlugin,server,mactelnetd))
|
||||
$(eval $(call BuildPlugin,client,mactelnet))
|
||||
$(eval $(call BuildPlugin,ping,macping))
|
||||
$(eval $(call BuildPlugin,discover,mndp))
|
||||
Reference in New Issue
Block a user