Fix motd-carp-state.sh

The current release is not necessarily the first line of dmesg.boot
This commit is contained in:
Jérémy Dubois 2022-01-26 14:54:11 +01:00
parent fe6235f8fb
commit a34f3d606b
1 changed files with 1 additions and 1 deletions

View File

@ -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