Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net-tools: add netstat utiltiy #24088

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 23 additions & 1 deletion net/net-tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=net-tools
PKG_VERSION:=2.10
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://sourceforge.net/projects/net-tools/files/
Expand Down Expand Up @@ -53,6 +53,22 @@ define Package/net-tools-route/description
functionality of the net-tools variant (e.g. AF_X25).
endef

define Package/net-tools-netstat
SECTION:=net
CATEGORY:=Network
TITLE:=net-tools - netstat utility
URL:=http://net-tools.sourceforge.net/
feckert marked this conversation as resolved.
Show resolved Hide resolved
PROVIDES:=route
feckert marked this conversation as resolved.
Show resolved Hide resolved
ALTERNATIVES:=300:/bin/netstat:/usr/libexec/net-tools-netstat
endef

define Package/net-tools-netstat/description
Replace busybox version of the netstat command with the full net-tools
version. This is normally not needed as busybox is smaller and provides
sufficient functionality, but some users may want or need the full
functionality of the net-tools variant.
endef
feckert marked this conversation as resolved.
Show resolved Hide resolved

define Build/Configure
# Failed configure.sh leaves stub config.h around.
rm -f $(PKG_BUILD_DIR)/config.h
Expand All @@ -69,5 +85,11 @@ define Package/net-tools-route/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/usr/libexec/net-tools-route
endef

define Package/net-tools-netstat/install
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netstat $(1)/usr/libexec/net-tools-netstat
endef

$(eval $(call BuildPackage,mii-tool))
$(eval $(call BuildPackage,net-tools-route))
$(eval $(call BuildPackage,net-tools-netstat))