Date: Tue, 18 Apr 2023 06:39:20 GMT From: Matthew Seaman <matthew@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b5613f6f4f42 - main - sysutils/dynamic_motd: -- new port Message-ID: <202304180639.33I6dKiL038334@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by matthew: URL: https://cgit.FreeBSD.org/ports/commit/?id=b5613f6f4f42d9fe4b28704055698b9038b93e81 commit b5613f6f4f42d9fe4b28704055698b9038b93e81 Author: Matthew Seaman <matthew@FreeBSD.org> AuthorDate: 2023-04-18 06:36:55 +0000 Commit: Matthew Seaman <matthew@FreeBSD.org> CommitDate: 2023-04-18 06:38:58 +0000 sysutils/dynamic_motd: -- new port dynamic_motd is a drop-in replacement for generating messages of the day on FreeBSD 13.0 or later. During system startup, the file /var/run/motd is replaced with a fifo whose content is generated by a user-configurable shell script that is executed on each login. All other aspects of motd(5) are preserved. PR: 267107 Reported by: Steven Stallion --- sysutils/Makefile | 1 + sysutils/dynamic_motd/Makefile | 19 +++++++++++++++++++ sysutils/dynamic_motd/distinfo | 3 +++ sysutils/dynamic_motd/pkg-descr | 5 +++++ sysutils/dynamic_motd/pkg-message | 23 +++++++++++++++++++++++ sysutils/dynamic_motd/pkg-plist | 7 +++++++ 6 files changed, 58 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 34461c48677d..407a5ef30cf8 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -339,6 +339,7 @@ SUBDIR += dwatch-gource SUBDIR += dwatch-json SUBDIR += dwatch-pwsnoop + SUBDIR += dynamic_motd SUBDIR += e2fsprogs SUBDIR += e2fsprogs-core SUBDIR += e2tools diff --git a/sysutils/dynamic_motd/Makefile b/sysutils/dynamic_motd/Makefile new file mode 100644 index 000000000000..56cdae0f78b1 --- /dev/null +++ b/sysutils/dynamic_motd/Makefile @@ -0,0 +1,19 @@ +PORTNAME= dynamic_motd +DISTVERSIONPREFIX= v +DISTVERSION= 1.3 +CATEGORIES= sysutils + +MAINTAINER= sstallion@gmail.com +COMMENT= Dynamic /var/run/motd +WWW= https://github.com/sstallion/dynamic_motd + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +IGNORE_FreeBSD_12= requires FreeBSD 13.0 or later + +NO_ARCH= yes +USE_GITHUB= yes +GH_ACCOUNT= sstallion + +.include <bsd.port.mk> diff --git a/sysutils/dynamic_motd/distinfo b/sysutils/dynamic_motd/distinfo new file mode 100644 index 000000000000..7b32f8fb36e6 --- /dev/null +++ b/sysutils/dynamic_motd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1681758637 +SHA256 (sstallion-dynamic_motd-v1.3_GH0.tar.gz) = 4f000c16f881ac15761b3c878c4845f0cb4f67a6de5172b2562384ac88143505 +SIZE (sstallion-dynamic_motd-v1.3_GH0.tar.gz) = 192602 diff --git a/sysutils/dynamic_motd/pkg-descr b/sysutils/dynamic_motd/pkg-descr new file mode 100644 index 000000000000..b069d418c114 --- /dev/null +++ b/sysutils/dynamic_motd/pkg-descr @@ -0,0 +1,5 @@ +dynamic_motd is a drop-in replacement for generating messages of the day on +FreeBSD 13.0 or later. During system startup, the file /var/run/motd is +replaced with a fifo whose content is generated by a user-configurable shell +script that is executed on each login. All other aspects of motd(5) are +preserved. diff --git a/sysutils/dynamic_motd/pkg-message b/sysutils/dynamic_motd/pkg-message new file mode 100644 index 000000000000..21c84f031db5 --- /dev/null +++ b/sysutils/dynamic_motd/pkg-message @@ -0,0 +1,23 @@ +[ +{ type: install + message: <<EOM +The ${PREFIX}/etc/rc.motd script is responsible for generating content for +/var/run/motd on each login. A sample script is provided in +${PREFIX}/etc/rc.motd.sample that emulates the default motd(5) behavior. +More extensive examples can be found in ${PREFIX}/share/examples/dynamic_motd. + +To enable the dynamic_motd service, update_motd should be disabled in +/etc/rc.conf as it is no longer needed at system startup: + + # sysrc update_motd="NO" + +The dynamic_motd service can then be enabled by issuing: + + # sysrc dynamic_motd="YES" + # service dynamic_motd start + +Note: ${PREFIX}/etc/rc.motd can be updated without restarting the +dynamic_motd service; changes are automatically picked up on next login. +EOM +} +] diff --git a/sysutils/dynamic_motd/pkg-plist b/sysutils/dynamic_motd/pkg-plist new file mode 100644 index 000000000000..93596d11fe54 --- /dev/null +++ b/sysutils/dynamic_motd/pkg-plist @@ -0,0 +1,7 @@ +etc/rc.d/dynamic_motd +@sample etc/rc.motd.sample +libexec/dynamic_motd +share/doc/dynamic_motd/CONTRIBUTING.md +share/doc/dynamic_motd/README.md +share/examples/dynamic_motd/motd.subr +share/examples/dynamic_motd/rc.motd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304180639.33I6dKiL038334>