From a34f3d606ba361a2772af33ae0700520acbe1ed6 Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Wed, 26 Jan 2022 14:54:11 +0100 Subject: [PATCH] Fix motd-carp-state.sh The current release is not necessarily the first line of dmesg.boot --- roles/post-install/files/motd-carp-state.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/post-install/files/motd-carp-state.sh b/roles/post-install/files/motd-carp-state.sh index ba65e7c..46185fb 100755 --- a/roles/post-install/files/motd-carp-state.sh +++ b/roles/post-install/files/motd-carp-state.sh @@ -6,7 +6,7 @@ fi if [ ! -f /tmp/carp.state ]; then # Replace OpenBSD version in motd after each boot for it to be up to date after an upgrade - sed -i "1 s/^.*$/$(head -1 \/var\/run\/dmesg.boot)/" /etc/motd-original + sed -i "1 s/^.*$/$(grep OpenBSD \/var\/run\/dmesg.boot | tail -1)/" /etc/motd-original echo "unknown" > /tmp/carp.state fi