Fix motd-carp-state.sh
The current release is not necessarily the first line of dmesg.boot
This commit is contained in:
parent
fe6235f8fb
commit
a34f3d606b
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue