]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extsearchidx: improve missing machine-id fallback
authorEric Wong <e@80x24.org>
Thu, 17 Dec 2020 19:40:06 +0000 (19:40 +0000)
committerEric Wong <e@80x24.org>
Fri, 18 Dec 2020 22:29:43 +0000 (22:29 +0000)
It's likely most GNU/Linux systems have /etc/machine-id these
days, so anything missing it is likely a *BSD, most of which
support and favor "sysctl -n kern.hostid".  We'll also support
"ghostid" since GNU utils are commonly prefixed with 'g' on
non-GNU platforms.

In any case, we'll suppress stderr from missing commands and
fall back to hard coding an $OSNAME-based identifier as a last
resort and hope the hostname is unique.


No differences found