Skip to content

Commit 7dd197b

Browse files
committed
Add an upgrade case to %post
1 parent 263701b commit 7dd197b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

srpm/update-motd.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ if [ "$1" = "1" ]; then
4444
cp -L /etc/motd.rpmsave /var/lib/update-motd/motd
4545
fi
4646
ln -snf /var/lib/update-motd/motd /etc/motd
47+
elif [ "$1" = "2" ]; then
48+
if [ -e /etc/motd ] && [ "$(readlink /etc/motd)" = "/var/run/motd" ]; then
49+
ln -snf /var/lib/update-motd/motd /etc/motd
50+
fi
4751
fi
4852
# We don't run update-motd on install because the various update-motd.d scripts
4953
# are not installed yet (since their packages will depend on this one).

0 commit comments

Comments
 (0)