Runtime scripts, systemd unit files, tmpfiles, and installer scripts to provide an issue/motd
mechanism for Fedora-based distributions and possibly others. To be distributed as an RPM, with some additional manual configuration required to work with software like PAM, agetty, ...
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=29943687
sudo su
# curl --remote-name-all https://kojipkgs.fedoraproject.org//work/tasks/3687/29943687/fedora-user-messages-0.1-1.fc28.noarch.rpm https://kojipkgs.fedoraproject.org//work/tasks/3687/29943687/fedora-user-messages-issuegen-0.1-1.fc28.noarch.rpm https://kojipkgs.fedoraproject.org//work/tasks/3687/29943687/fedora-user-messages-motdgen-0.1-1.fc28.noarch.rpm https://kojipkgs.fedoraproject.org//work/tasks/3687/29943687/fedora-user-messages-profile-0.1-1.fc28.noarch.rpm # dnf install fedora-user-messages-* # systemctl reboot
SSH back in
Note: have to manually start the units right now (issuegen only triggers because of the udev rule)
systemctl start motdgen.service motdgen.path issuegen.service issuegen.path
Let x
denote {motd,issue}
.
/etc/x.d/fedora-user-messages.x
to /run/fedora-user-messages.x
are set by systemd-tmpfiles
.issuegen
and motdgen
generate /run/fedora-user-messages.x
, from files in /run/fedora-user-messages/x.d
, /lib/usr/coreos/x.d
.issue
s or motd
s by placing files in /etc/x.d/
, which is a feature already provided by Fedora 29./etc/fedora-user-messages/x.d
to have the issuegen/motdgen services append their files to the generated x
./etc/fedora-user-messages/x.d/
%files
as part of the coreos-ux package. The symlinks /etc/motd -> /etc/run
and /etc/issue -> /run/issue
do not get created if they exist./etc/x
symlinks - have a symlink to the generated file in /etc/x.d/fedora-user-messages.x
. Cockpit currently places cockpit.issue
in /etc/issue.d/
(see "Files" in https://rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/c/cockpit-ws-178-1.fc30.x86_64.html) This is because /etc/x
is owned by fedora-release, and we should not change this.%post
? WantedBy
a .target
required? Or is this done by preset config?rpm-build.sh
more tmpfiles named pkg-fedora-user-messages-*.conf
are
created, which include lines to create directories in run; /run/fedora-user-messages
, /run/fedora-user-messages/issue.d
, /run/fedora-user-messages/motd.d
. This clutters up tmpfiles.d (given that this package contains 3 tmpfiles already). May want to consider another something like CL's baselayout rather than have several tmpfiles.dnf
and rpm-ostree
when getting data about updates