From a8698e63bb3496c117bfccfbb3e1be5fd65fa001 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 21 May 2007 08:22:43 +0000 Subject: [PATCH] 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. --- etc/rc.d/hostid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/hostid b/etc/rc.d/hostid index 2ba43982245..6673aa01239 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)