summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorrse <rse@FreeBSD.org>2007-05-21 08:22:43 +0000
committerrse <rse@FreeBSD.org>2007-05-21 08:22:43 +0000
commit24abaf28df6e59287d48e994db039a57a6bbe26a (patch)
tree033e3802a4cc61149edf11b27facbd3385c5189b /etc/rc.d
parent9c6d3b6f5298eb6850e7b644c54a2142d3a70967 (diff)
downloadFreeBSD-src-24abaf28df6e59287d48e994db039a57a6bbe26a.zip
FreeBSD-src-24abaf28df6e59287d48e994db039a57a6bbe26a.tar.gz
The standardized textual representation of UUIDs according to RFC 4122
and ISO/IEC-9834-8:2005 is with LOWER-CASE hexadecimal characters only, so translate the (usually upper-case and this way not conforming) representation of the BIOS UUID when reading it. Also be more strict about the valid characters in the textual representation by checking for just the hexadecimal characters.
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/hostid4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/hostid b/etc/rc.d/hostid
index 2ba4398..6673aa0 100644
--- a/etc/rc.d/hostid
+++ b/etc/rc.d/hostid
@@ -56,8 +56,8 @@ hostid_set()
hostid_hardware()
{
- uuid=`kenv smbios.system.uuid 2>/dev/null`
- x="[0-9a-zA-Z]"
+ uuid=`kenv smbios.system.uuid 2>/dev/null | tr '[:upper:]' '[:lower:]'`
+ x="[0-9a-f]"
y=$x$x$x$x
case "${uuid}" in
$y$y-$y-$y-$y-$y$y$y)
OpenPOWER on IntegriCloud