From 79a96e294c1acb4a2d17447a35f08647a6d09978 Mon Sep 17 00:00:00 2001 From: Eugene Grosbein Date: Mon, 19 Jun 2023 14:49:35 +0700 Subject: [PATCH] motd: unbreak for source upgrade In case of source upgrade path from 12.x proper merge of new /etc installs /etc/motd.template. Becase of that, the system in left without symlink /etc/motd -> /var/run/motd but with stale /etc/motd contents. Fix it creating symlink despite of presence of /etc/motd.template. MFC after: 1 week --- libexec/rc/rc.d/motd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/motd b/libexec/rc/rc.d/motd index e27cf273741d..da050882c367 100755 --- a/libexec/rc/rc.d/motd +++ b/libexec/rc/rc.d/motd @@ -38,10 +38,10 @@ motd_start() # Otherwise, create an empty template file. install -c -o root -g wheel -m ${PERMS} /dev/null "${TEMPLATE}" fi - # Provide compatibility symlink: - if [ ! -h "${COMPAT_MOTD}" ]; then - ln -sF "${TARGET}" "${COMPAT_MOTD}" - fi + fi + # Provide compatibility symlink: + if [ ! -h "${COMPAT_MOTD}" ]; then + ln -sF "${TARGET}" "${COMPAT_MOTD}" fi T=`mktemp -t motd`