From d606cee415b6eea8a46c793cd9f71a41e06c0c43 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Tue, 3 Jan 2023 15:00:16 +0100 Subject: [PATCH] mkmotd: Use hostconfig When tags are changed and motd.pl is run (e.g. via clusterd), then /etc/motd will still show the old tags, because `mkmotd.pl` uses `/node` which was populated during the last boot. Use `hostconfig` instead `/node` to find tags. --- mkmotd/mkmotd.pl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mkmotd/mkmotd.pl b/mkmotd/mkmotd.pl index ab9a265..82d18a0 100755 --- a/mkmotd/mkmotd.pl +++ b/mkmotd/mkmotd.pl @@ -41,16 +41,7 @@ EOF - $TEMPLATE .= " / to bee or not to bee / "; - - if ( -d '/node/tags' ) { - $_ = `ls /node/tags`; - s/\n/ /g; - $TEMPLATE .= "tags: $_"; - } - - $TEMPLATE .= "\n"; - + $TEMPLATE .= " / to bee or not to bee / tags: ".`hostconfig`."\n"; } else { die "$os_release : unknown os_release\n";