Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
donald committed Jan 3, 2023
1 parent 91f3a14 commit d606cee
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions mkmotd/mkmotd.pl
Expand Up @@ -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";
Expand Down

0 comments on commit d606cee

Please sign in to comment.