From owner-svn-ports-all@freebsd.org Sat Nov 7 05:24:07 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5A9B2E492E; Sat, 7 Nov 2020 05:24:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSlzq5L9Yz3rkr; Sat, 7 Nov 2020 05:24:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA0FE1730; Sat, 7 Nov 2020 05:24:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A75O7R4073092; Sat, 7 Nov 2020 05:24:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A75O6aW073088; Sat, 7 Nov 2020 05:24:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202011070524.0A75O6aW073088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 7 Nov 2020 05:24:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554342 - in head/sysutils: . ethname X-SVN-Group: ports-head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sysutils: . ethname X-SVN-Commit-Revision: 554342 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 05:24:07 -0000 Author: kevans Date: Sat Nov 7 05:24:06 2020 New Revision: 554342 URL: https://svnweb.freebsd.org/changeset/ports/554342 Log: [NEW PORT] sysutils/ethname: boot-time (re)naming of ethernet devices by MAC An rc-script for pinning an ethernet network name to a MAC address. -- This isn't typically needed on PCIe systems, but for systems with multiple USB ethernet (ue) devices, which seem to like to come up in non-deterministic order, it is very helpful; doubly so when the system in question is a router / firewall where the network config and security concerns vary wildly from one device to the next. It could also be of use for traditional NICs (PCIe) when adding a new card to a system, for example, and ensuring that the existing, previously configured device sticks to the MAC address, and not having to worry about which ends up /dev/xxxN vs /dev/xxxM. The script inserts itself before netif, waits an adjustable delay for the expected devices to appear, and then renames them as requested by the user. All of the device configuration, pf, etc., can be written with the new names. It does not attempt to automatically handle devices added after boot. -- Usage is described in the script, but effectively: $ cat /etc/rc.conf ethname_enable="YES" ethname_foo0_mac="aa:bb:cc:dd:ee:00" ethname_bar_mac="aa:bb:cc:dd:ee:01" # Optionally, otherwise it'll just enumerate all ethname_*_mac vars: ethname_names="foo0 bar" PR: 212480 Submitted by: eborisch gmail com Added: head/sysutils/ethname/ head/sysutils/ethname/Makefile (contents, props changed) head/sysutils/ethname/distinfo (contents, props changed) head/sysutils/ethname/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sat Nov 7 02:11:14 2020 (r554341) +++ head/sysutils/Makefile Sat Nov 7 05:24:06 2020 (r554342) @@ -312,6 +312,7 @@ SUBDIR += etc_os-release SUBDIR += etcmerge SUBDIR += etcupdate + SUBDIR += ethname SUBDIR += evhz SUBDIR += evisum SUBDIR += evtviewer Added: head/sysutils/ethname/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ethname/Makefile Sat Nov 7 05:24:06 2020 (r554342) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +PORTNAME= ethname +PORTVERSION= 2.0.1 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= eborisch@gmail.com +COMMENT= MAC-based network name pinning + +LICENSE= MIT + +USE_GITHUB= yes +GH_ACCOUNT= eborisch + +NO_ARCH= yes +NO_BUILD= yes + +PLIST_FILES= etc/rc.d/ethname \ + share/ethname/README.md + +.include Added: head/sysutils/ethname/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ethname/distinfo Sat Nov 7 05:24:06 2020 (r554342) @@ -0,0 +1,3 @@ +TIMESTAMP = 1583781876 +SHA256 (eborisch-ethname-v2.0.1_GH0.tar.gz) = 2a074b530d042843ff5234405f039a5b65d60f33276aa811fcb4f04a01f75737 +SIZE (eborisch-ethname-v2.0.1_GH0.tar.gz) = 4488 Added: head/sysutils/ethname/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ethname/pkg-descr Sat Nov 7 05:24:06 2020 (r554342) @@ -0,0 +1,3 @@ +An rc-script for pinning an ethernet network name to a MAC address. + +WWW: https://github.com/eborisch/ethname