kmod: add ALTERNATIVES 12468/head
authorHuangbin Zhan <zhanhb88@gmail.com>
Fri, 1 May 2020 05:51:33 +0000 (13:51 +0800)
committerHuangbin Zhan <zhanhb88@gmail.com>
Tue, 9 Jun 2020 22:38:01 +0000 (06:38 +0800)
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
utils/kmod/Makefile

index b9e7b6068ec0da02cdd65786f7e17bea9c9f0683..ecd7e3d6dfebc6e118cba292e4c654588a6657c1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kmod
 PKG_VERSION:=20
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod/
@@ -32,6 +32,13 @@ define Package/kmod/Default
   TITLE:=Linux kernel module handling
   URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
   DEPENDS:=+zlib
+  ALTERNATIVES:=\
+    200:/sbin/depmod:/sbin/kmod \
+    200:/sbin/insmod:/sbin/kmod \
+    200:/sbin/lsmod:/sbin/kmod \
+    200:/sbin/modinfo:/sbin/kmod \
+    200:/sbin/modprobe:/sbin/kmod \
+    200:/sbin/rmmod:/sbin/kmod
 endef
 
 
@@ -46,21 +53,9 @@ Linux kernel module handling
  insert, remove, list, check properties, resolve dependencies and aliases.
 endef
 
-LEGACY_BINARIES:= \
-       depmod \
-       insmod \
-       lsmod \
-       modinfo \
-       modprobe \
-       rmmod
-
 define Package/kmod/install
        $(INSTALL_DIR) $(1)/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
-
-       for b in $(LEGACY_BINARIES); do \
-               ln -sf kmod $(1)/sbin/$$$$b ; \
-       done
 endef