Skip to content

Commit

Permalink
fedora-coreos-base: Add postprocess script to configure login.defs
Browse files Browse the repository at this point in the history
Add `/run/motd.d` as one of the directories that `login(1)` reads
from to display the MOTD. This is required for newer versions of
`console-login-helper-messages` to function properly. The script
can be dropped when `util-linux` adds `/run/motd.d` as a default
in Fedora 34.
https://src.fedoraproject.org/rpms/util-linux/pull-request/8
coreos/fedora-coreos-tracker#704 (comment)
  • Loading branch information
kelvinfan001 authored and HuijingHei committed Oct 10, 2023
1 parent 4f33717 commit f1b421b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manifests/fedora-coreos-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ postprocess:
DNSStubListener=no
EOF
# Edit `login.defs` to configure `login(1)` to read from `/run/motd.d` for
# displaying the MOTD. This is required for newer versions of
# `console-login-helper-messages` to function properly.
# This will be dropped once Fedora util-linux adds `/run/motd.d` as a default
# in Fedora 34.
# https://src.fedoraproject.org/rpms/util-linux/pull-request/8
# https://github.com/coreos/fedora-coreos-tracker/issues/704#issuecomment-772862174
- |
#!/usr/bin/env bash
source /etc/os-release
if [ ${VERSION_ID} -lt 34 ]; then
echo 'MOTD_FILE=/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d' >> /etc/login.defs
fi
packages:
# Security
- selinux-policy-targeted
Expand Down

0 comments on commit f1b421b

Please sign in to comment.