aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@FreeBSD.org>2007-05-21 08:22:43 +0000
committerRalf S. Engelschall <rse@FreeBSD.org>2007-05-21 08:22:43 +0000
commita8698e63bb3496c117bfccfbb3e1be5fd65fa001 (patch)
tree033e3802a4cc61149edf11b27facbd3385c5189b /etc/rc.d
parent9382f00b4657247a0dcc7fc49b87ca87cc520d77 (diff)
downloadsrc-a8698e63bb3496c117bfccfbb3e1be5fd65fa001.tar.gz
src-a8698e63bb3496c117bfccfbb3e1be5fd65fa001.zip
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.
Notes
Notes: svn path=/head/; revision=169818
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 2ba43982245f..6673aa012391 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)