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 jlebon committed Feb 4, 2021
1 parent 07ba41f commit e58d559
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manifests/fedora-coreos-base.yaml
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 e58d559

Please sign in to comment.