Runtime scripts, systemd unit files, tmpfiles, and installer scripts to provide an issue/motd
mechanism for RHCOS/FCOS. To be distributed as an RPM, with some additional manual configuration required to work with software like PAM, agetty, ...
$ git clone https://github.com/rfairley/fedora-coreos-login-messages && cd fedora-coreos-login-messages $ ./rpm-build.sh
Then edit config.vm.box
in the Vagrantfile
in this repo. I named an RHCOS box rhcos
on my system. Can also install on fedora/28-cloud-base
.
$ vagrant up $ vagrant ssh
Once SSH'd in (RHCOS example):
$ sudo su # cd /srv/fedora-coreos-login-messages # rpm-ostree install rpms/noarch/* # systemctl reboot
Let x
denote {motd,issue}
.
/etc/x
to /run/x
are set by systemd-tmpfiles
.issuegen
and motdgen
generate /run/x
, from files in /etc/coreos/x.d
, /run/coreos/x.d
, /lib/usr/coreos/x.d
.issue
or motd
by placing a file in /etc/coreos/x.d/
.[root@a5cba1b23420 view-rpm-tree-output]# ../view-rpm-tree.sh ... [root@a5cba1b23420 view-rpm-tree-output]# tree . |-- etc | `-- coreos | |-- issue.d | `-- motd.d |-- run | `-- coreos | |-- issue.d | `-- motd.d |-- usr | |-- lib | | |-- coreos | | | |-- issue.d | | | | `-- base.issue | | | |-- issuegen | | | |-- motd.d | | | `-- motdgen | | |-- systemd | | | `-- system | | | |-- issuegen.path | | | |-- issuegen.service | | | |-- motdgen.path | | | `-- motdgen.service | | |-- tmpfiles.d | | | |-- coreos-profile.conf | | | |-- issuegen.conf | | | `-- motdgen.conf | | `-- udev | | `-- rules.d | | `-- 91-issuegen.rules | `-- share | |-- coreos | | `-- coreos-profile.sh | |-- doc | | `-- coreos-ux | | `-- README.md | `-- licenses | `-- coreos-ux | `-- LICENSE `-- view-rpm-tree-output 25 directories, 14 files
%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.%post
? WantedBy
a .target
required? Or is this done by preset config?rpm-build.sh
more tmpfiles named pkg-coreos-ux-*.conf
are
created, which include lines to create directories in run; /run/coreos
, /run/coreos/issue.d
, /run/coreos/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.